diff --git a/src/Math/RectangularMatrix.h b/src/Math/RectangularMatrix.h index cbb0a685f..244100af0 100644 --- a/src/Math/RectangularMatrix.h +++ b/src/Math/RectangularMatrix.h @@ -76,11 +76,11 @@ template class RectangularMatrix { * @attention Use with caution, the function doesn't check whether the * array is long enough. */ - constexpr static RectangularMatrix& from(T* data) { + static RectangularMatrix& from(T* data) { return *reinterpret_cast*>(data); } /** @overload */ - constexpr static const RectangularMatrix& from(const T* data) { + static const RectangularMatrix& from(const T* data) { return *reinterpret_cast*>(data); } @@ -531,10 +531,10 @@ extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utilit #endif #define MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(cols, rows, ...) \ - constexpr static __VA_ARGS__& from(T* data) { \ + static __VA_ARGS__& from(T* data) { \ return *reinterpret_cast<__VA_ARGS__*>(data); \ } \ - constexpr static const __VA_ARGS__& from(const T* data) { \ + static const __VA_ARGS__& from(const T* data) { \ return *reinterpret_cast(data); \ } \ \ diff --git a/src/Math/Vector.h b/src/Math/Vector.h index 89e7b8f55..1b47329c7 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -71,11 +71,11 @@ template class Vector { * @attention Use with caution, the function doesn't check whether the * array is long enough. */ - constexpr static Vector& from(T* data) { + static Vector& from(T* data) { return *reinterpret_cast*>(data); } /** @overload */ - constexpr static const Vector& from(const T* data) { + static const Vector& from(const T* data) { return *reinterpret_cast*>(data); } @@ -1042,10 +1042,10 @@ extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utilit #ifndef DOXYGEN_GENERATING_OUTPUT #define MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(size, Type) \ - constexpr static Type& from(T* data) { \ + static Type& from(T* data) { \ return *reinterpret_cast*>(data); \ } \ - constexpr static const Type& from(const T* data) { \ + static const Type& from(const T* data) { \ return *reinterpret_cast*>(data); \ } \ \