refs #624 Use inheriting constructors in CValueObject.

This commit is contained in:
Mathew Sutcliffe
2016-03-19 23:20:14 +00:00
parent 91494ea2e5
commit 2ce1f3da0a

View File

@@ -144,10 +144,11 @@ namespace BlackMisc
using Mixin::MetaType<Derived>::registerMetadata; using Mixin::MetaType<Derived>::registerMetadata;
protected: protected:
//! Template constructor, forwards all arguments to base class constructor. //! Inheriting constructors.
//! \todo When our compilers support C++11 inheriting constructors, use those instead. using Base::Base;
template <typename... Ts, typename = typename std::enable_if<! std::is_same<CValueObject, typename Private::DecayFirst<Ts...>::type>::value>::type>
CValueObject(Ts &&... args) : Base(std::forward<Ts>(args)...) {} //! Default constructor.
CValueObject() = default;
//! Copy constructor. //! Copy constructor.
CValueObject(const CValueObject &) = default; CValueObject(const CValueObject &) = default;