From b7c5a6f79557f61ec9a239dd021edaa6ce8cc687 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 19 Oct 2022 17:11:35 +0200 Subject: [PATCH] Math: fix BitVector inconsistent constexpr --- src/Magnum/Math/BitVector.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Math/BitVector.h b/src/Magnum/Math/BitVector.h index 5f3e46770..ee1e0c3c3 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 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 inline bool BitVector::operator==(const BitVect return true; } -template inline bool BitVector::all() const { +template MAGNUM_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;