Fixing compilation problem with Centos7

This commit is contained in:
Erwan Croze 2018-01-24 10:27:00 +01:00
parent 5c635ab5c2
commit 0bc7d25eed

View file

@ -138,6 +138,12 @@ private:
return (mMask & value) == value && (value || mMask == 0);
}
// On CentOs 7 GCC 4.8.5 have issue with array-bounds
#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ == 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
static constexpr StorageType init (
typename std::initializer_list<T>::const_iterator begin,
typename std::initializer_list<T>::const_iterator end
@ -145,6 +151,10 @@ private:
return begin != end ? (StorageType(*begin) | init(begin + 1, end)) : StorageType(0);
}
#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ == 5
#pragma GCC diagnostic pop
#endif
StorageType mMask;
};