diff --git a/src/Magnum/Array.h b/src/Magnum/Array.h index 0001b2107..efec033cb 100644 --- a/src/Magnum/Array.h +++ b/src/Magnum/Array.h @@ -76,7 +76,12 @@ template class Array { #ifdef DOXYGEN_GENERATING_OUTPUT constexpr /*implicit*/ Array(T value); #else - template::value && dimensions != 1, T>::type> constexpr /*implicit*/ Array(U value): Array(typename Math::Implementation::GenerateSequence::Type(), value) {} + template::value && dimensions != 1, T>::type> + #ifndef CORRADE_MSVC2015_COMPATIBILITY + /* Can't use delegating constructors with constexpr -- https://connect.microsoft.com/VisualStudio/feedback/details/1579279/c-constexpr-does-not-work-with-delegating-constructors */ + constexpr + #endif + /*implicit*/ Array(U value): Array(typename Math::Implementation::GenerateSequence::Type(), value) {} #endif /** @brief Equality */ diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 3da20b600..3ecf94fa2 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -108,7 +108,12 @@ template class RectangularMatrix { } /** @brief Construct zero-filled matrix */ - constexpr /*implicit*/ RectangularMatrix(ZeroInitT = ZeroInit) + /** @todo Remove MSVC workaround when fixed */ + #ifndef CORRADE_MSVC2015_COMPATIBILITY + /* Can't use delegating constructors with constexpr -- https://connect.microsoft.com/VisualStudio/feedback/details/1579279/c-constexpr-does-not-work-with-delegating-constructors */ + constexpr + #endif + /*implicit*/ RectangularMatrix(ZeroInitT = ZeroInit) /** @todoc remove workaround when doxygen is sane */ #ifndef DOXYGEN_GENERATING_OUTPUT /* MSVC 2015 can't handle {} here */ diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index 89f759a0e..42c0b7412 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -174,7 +174,12 @@ template class Vector { #ifdef DOXYGEN_GENERATING_OUTPUT constexpr explicit Vector(T value); #else - template::value && size != 1, T>::type> constexpr explicit Vector(U value): Vector(typename Implementation::GenerateSequence::Type(), value) {} + template::value && size != 1, T>::type> + #ifndef CORRADE_MSVC2015_COMPATIBILITY + /* Can't use delegating constructors with constexpr -- https://connect.microsoft.com/VisualStudio/feedback/details/1579279/c-constexpr-does-not-work-with-delegating-constructors */ + constexpr + #endif + explicit Vector(U value): Vector(typename Implementation::GenerateSequence::Type(), value) {} #endif /** @@ -188,7 +193,12 @@ template class Vector { * // integral == {1, 2, -15, 7} * @endcode */ - template constexpr explicit Vector(const Vector& other): Vector(typename Implementation::GenerateSequence::Type(), other) {} + template + #ifndef CORRADE_MSVC2015_COMPATIBILITY + /* Can't use delegating constructors with constexpr -- https://connect.microsoft.com/VisualStudio/feedback/details/1579279/c-constexpr-does-not-work-with-delegating-constructors */ + constexpr + #endif + explicit Vector(const Vector& other): Vector(typename Implementation::GenerateSequence::Type(), other) {} /** @brief Construct vector from external representation */ template::from(std::declval()))> constexpr explicit Vector(const U& other): Vector(Implementation::VectorConverter::from(other)) {}