diff --git a/src/Array.h b/src/Array.h index 75a185a52..76bc627f9 100644 --- a/src/Array.h +++ b/src/Array.h @@ -69,7 +69,12 @@ template class Array { #ifdef DOXYGEN_GENERATING_OUTPUT template constexpr /*implicit*/ Array(T first, U... next); #else - template::type> constexpr /*implicit*/ Array(T first, U... next): _data{first, next...} {} + template::type> constexpr /*implicit*/ Array(T first, U... next): + #ifndef CORRADE_MSVC2013_COMPATIBILITY + _data{first, next...} {} + #else + _data({first, next...}) {} + #endif #endif /** @brief Construct array with one value for all fields */ diff --git a/src/Math/BoolVector.h b/src/Math/BoolVector.h index 9866ee114..ded6352fa 100644 --- a/src/Math/BoolVector.h +++ b/src/Math/BoolVector.h @@ -33,6 +33,10 @@ #include "Types.h" +#ifdef CORRADE_MSVC2013_COMPATIBILITY +#include +#endif + namespace Magnum { namespace Math { namespace Implementation { @@ -79,7 +83,12 @@ template class BoolVector { #ifdef DOXYGEN_GENERATING_OUTPUT template constexpr /*implicit*/ BoolVector(UnsignedByte first, T... next); #else - template::type> constexpr /*implicit*/ BoolVector(UnsignedByte first, T... next): _data{first, UnsignedByte(next)...} {} + template::type> constexpr /*implicit*/ BoolVector(UnsignedByte first, T... next): + #ifndef CORRADE_MSVC2013_COMPATIBILITY + _data{first, UnsignedByte(next)...} {} + #else + _data({first, UnsignedByte(next)...}) {} + #endif #endif /** @brief Construct boolean vector with one value for all fields */ @@ -107,8 +116,22 @@ template class BoolVector { * * @see operator[](), set() */ - UnsignedByte* data() { return _data; } - constexpr const UnsignedByte* data() const { return _data; } /**< @overload */ + UnsignedByte* data() { + #ifndef CORRADE_MSVC2013_COMPATIBILITY + return _data; + #else + return _data.data(); + #endif + } + + /** @overload */ + constexpr const UnsignedByte* data() const { + #ifndef CORRADE_MSVC2013_COMPATIBILITY + return _data; + #else + return _data.data(); + #endif + } /** @brief Bit at given position */ constexpr bool operator[](std::size_t i) const { @@ -211,9 +234,18 @@ template class BoolVector { }; /* Implementation for Vector::Vector(U) */ - template constexpr explicit BoolVector(Implementation::Sequence, UnsignedByte value): _data{Implementation::repeat(value, sequence)...} {} - + template constexpr explicit BoolVector(Implementation::Sequence, UnsignedByte value): + #ifndef CORRADE_MSVC2013_COMPATIBILITY + _data{Implementation::repeat(value, sequence)...} {} + #else + _data({Implementation::repeat(value, sequence)...}) {} + #endif + + #ifndef CORRADE_MSVC2013_COMPATIBILITY UnsignedByte _data[(size-1)/8+1]; + #else + std::array _data; + #endif }; /** @debugoperator{Magnum::Math::BoolVector} */ diff --git a/src/Math/Vector.h b/src/Math/Vector.h index 9b66f4e35..e0f2d8a92 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -40,10 +40,6 @@ #include "magnumVisibility.h" -#ifdef CORRADE_MSVC2013_COMPATIBILITY -#include -#endif - namespace Magnum { namespace Math { namespace Implementation {