diff --git a/src/blackmisc/propertyindexvariantmap.h b/src/blackmisc/propertyindexvariantmap.h index ebc708a01..0cbcb62de 100644 --- a/src/blackmisc/propertyindexvariantmap.h +++ b/src/blackmisc/propertyindexvariantmap.h @@ -25,6 +25,16 @@ namespace BlackMisc class CPropertyIndexVariantMap; + // workaround GCC 4.7 bug + namespace Aviation { template class CModulator; } + namespace Private + { + template struct is_default_constructible : std::is_default_constructible {}; +# if __GNUC__ == 4 && __GNUC_MINOR__ <= 7 + template struct is_default_constructible> : std::false_type {}; +# endif + } + namespace Mixin { @@ -66,14 +76,14 @@ namespace BlackMisc const Derived *derived() const { return static_cast(this); } Derived *derived() { return static_cast(this); } - template ::value, int>::type = 0> + template ::value, int>::type = 0> CVariant myself() const { return CVariant::from(*derived()); } - template ::value, int>::type = 0> + template ::value, int>::type = 0> void myself(const CVariant &variant) { *derived() = variant.to(); } - template ::value, int>::type = 0> + template ::value, int>::type = 0> CVariant myself() const { qFatal("isMyself should have been handled before reaching here"); return {}; } - template ::value, int>::type = 0> + template ::value, int>::type = 0> void myself(const CVariant &) { qFatal("isMyself should have been handled before reaching here"); } template