diff --git a/src/Magnum/Math/Packing.h b/src/Magnum/Math/Packing.h index 61a2d0d27..7ef6e4076 100644 --- a/src/Magnum/Math/Packing.h +++ b/src/Magnum/Math/Packing.h @@ -43,7 +43,7 @@ and @ref Magnum::Math::Rad "Rad". namespace Implementation { -template inline constexpr T bitMax() { +template constexpr T bitMax() { return T(typename std::make_unsigned::type(~T{}) >> (sizeof(T)*8 - (std::is_signed::value ? bits - 1 : bits))); }