diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index eab0787e1..b233d6a7e 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -52,8 +52,14 @@ public: static const QString PatternMaxVerStr; static const QString CurrentSchema; +// GCC 4.6 doesn't allow constexpr and const together +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 406 static Q_DECL_CONSTEXPR const int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0); static Q_DECL_CONSTEXPR const int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3); +#else + static Q_DECL_CONSTEXPR int PatternMinVer = CONVERTER_VERSION_CHECK(0, 1, 0); + static Q_DECL_CONSTEXPR int PatternMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3); +#endif protected: virtual int MinVer() const Q_DECL_OVERRIDE; diff --git a/src/libs/ifc/xml/vvitconverter.h b/src/libs/ifc/xml/vvitconverter.h index 974a4fb4f..942ebf666 100644 --- a/src/libs/ifc/xml/vvitconverter.h +++ b/src/libs/ifc/xml/vvitconverter.h @@ -48,8 +48,14 @@ public: static const QString MeasurementMaxVerStr; static const QString CurrentSchema; +// GCC 4.6 doesn't allow constexpr and const together +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 406 static Q_DECL_CONSTEXPR const int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 2, 0); static Q_DECL_CONSTEXPR const int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3); +#else + static Q_DECL_CONSTEXPR int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 2, 0); + static Q_DECL_CONSTEXPR int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 3, 3); +#endif protected: virtual int MinVer() const Q_DECL_OVERRIDE; diff --git a/src/libs/ifc/xml/vvstconverter.h b/src/libs/ifc/xml/vvstconverter.h index 72e03a84a..39c07af07 100644 --- a/src/libs/ifc/xml/vvstconverter.h +++ b/src/libs/ifc/xml/vvstconverter.h @@ -48,8 +48,14 @@ public: static const QString MeasurementMaxVerStr; static const QString CurrentSchema; +// GCC 4.6 doesn't allow constexpr and const together +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 406 static Q_DECL_CONSTEXPR const int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 3, 0); static Q_DECL_CONSTEXPR const int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 4, 2); +#else + static Q_DECL_CONSTEXPR int MeasurementMinVer = CONVERTER_VERSION_CHECK(0, 3, 0); + static Q_DECL_CONSTEXPR int MeasurementMaxVer = CONVERTER_VERSION_CHECK(0, 4, 2); +#endif protected: virtual int MinVer() const Q_DECL_OVERRIDE;