Browse Source

Math: fix BitVector inconsistent constexpr

pull/597/head
Stanislaw Halik 4 years ago
parent
commit
b7c5a6f795
  1. 7
      src/Magnum/Math/BitVector.h

7
src/Magnum/Math/BitVector.h

@ -35,6 +35,7 @@
#ifndef CORRADE_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
#include <Corrade/Utility/Macros.h>
#include "Magnum/Types.h"
#include "Magnum/Math/Math.h"
@ -174,14 +175,14 @@ template<std::size_t size> class BitVector {
* Equivalent to @ref all().
* @see @ref any(), @ref none()
*/
explicit operator bool() const { return all(); }
explicit MAGNUM_CONSTEXPR14 operator bool() const { return all(); }
/**
* @brief Whether all bits are set
*
* @see @ref none(), @ref any(), @ref operator bool()
*/
bool all() const;
MAGNUM_CONSTEXPR14 bool all() const;
/**
* @brief Whether no bits are set
@ -361,7 +362,7 @@ template<std::size_t size> inline bool BitVector<size>::operator==(const BitVect
return true;
}
template<std::size_t size> inline bool BitVector<size>::all() const {
template<std::size_t size> MAGNUM_CONSTEXPR14 inline bool BitVector<size>::all() const {
/* Check all full segments */
for(std::size_t i = 0; i != size/8; ++i)
if(_data[i] != FullSegmentMask) return false;

Loading…
Cancel
Save