refs #413, #403 Removed default constructors of CAvionicsBase and CPhysicalQuantity, not needed.

Conflicts:
	src/blackmisc/aviation/avionicsbase.h
This commit is contained in:
Mathew Sutcliffe
2015-05-06 23:09:31 +01:00
parent 2f66785c63
commit 84800c190a
4 changed files with 17 additions and 18 deletions

View File

@@ -36,6 +36,21 @@
namespace BlackMisc
{
namespace Private
{
//! \private SFINAE for CValueObject constructor to avoid being selected as a viable copy constructor.
//! @{
template <typename...> struct DecayFirst
{
typedef void type;
};
template <typename T, typename... Ts> struct DecayFirst<T, Ts...>
{
typedef typename std::decay<T>::type type;
};
//! @}
}
/*!
* Default base class for CValueObject.
*/
@@ -138,13 +153,10 @@ namespace BlackMisc
using Mixin::MetaType<Derived>::registerMetadata;
protected:
//! Default constructor.
CValueObject() = default;
//! Template constructor, forwards all arguments to base class constructor.
//! \todo When our compilers support C++11 inheriting constructors, use those instead.
template <typename T, typename... Ts, typename = typename std::enable_if<! std::is_same<CValueObject, typename std::decay<T>::type>::value>::type>
CValueObject(T &&first, Ts &&... args) : Base(std::forward<T>(first), std::forward<Ts>(args)...) {}
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)...) {}
//! Copy constructor.
CValueObject(const CValueObject &) = default;