diff --git a/src/Magnum/Math/BitVector.h b/src/Magnum/Math/BitVector.h index 5f3e467705..9ab506ff58 100644 --- a/src/Magnum/Math/BitVector.h +++ b/src/Magnum/Math/BitVector.h @@ -35,6 +35,7 @@ #ifndef CORRADE_NO_DEBUG #include #endif +#include #include "Magnum/Types.h" #include "Magnum/Math/Math.h" @@ -174,14 +175,14 @@ template class BitVector { * Equivalent to @ref all(). * @see @ref any(), @ref none() */ - explicit operator bool() const { return all(); } + explicit CORRADE_CONSTEXPR14 operator bool() const { return all(); } /** * @brief Whether all bits are set * * @see @ref none(), @ref any(), @ref operator bool() */ - bool all() const; + CORRADE_CONSTEXPR14 bool all() const; /** * @brief Whether no bits are set @@ -361,7 +362,7 @@ template inline bool BitVector::operator==(const BitVect return true; } -template inline bool BitVector::all() const { +template CORRADE_CONSTEXPR14 inline bool BitVector::all() const { /* Check all full segments */ for(std::size_t i = 0; i != size/8; ++i) if(_data[i] != FullSegmentMask) return false; diff --git a/src/Magnum/Math/Test/BitVectorTest.cpp b/src/Magnum/Math/Test/BitVectorTest.cpp index cf83a50fe5..75dd12da1a 100644 --- a/src/Magnum/Math/Test/BitVectorTest.cpp +++ b/src/Magnum/Math/Test/BitVectorTest.cpp @@ -195,7 +195,7 @@ void BitVectorTest::convert() { constexpr BitVector<3> c{a}; CORRADE_COMPARE(c, b); - constexpr BVec3 d(b); + CORRADE_CONSTEXPR14 BVec3 d(b); CORRADE_COMPARE(d.x, a.x); CORRADE_COMPARE(d.y, a.y); CORRADE_COMPARE(d.z, a.z);