GCC 4.6 doesn't allow constexpr and const together.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-08-21 12:28:23 +03:00
parent b0d248a7a0
commit 8c6e2e4432
3 changed files with 18 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;