From a89a692dddcd93b83db7cd8eab8dd2e54aec0d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 6 Sep 2015 21:34:38 +0200 Subject: [PATCH] MSVC 2013 compatibility: {}-related issues. --- src/Magnum/Math/Test/MatrixTest.cpp | 6 ++++-- src/Magnum/Math/Test/RangeTest.cpp | 3 ++- src/Magnum/Math/Test/RectangularMatrixTest.cpp | 6 ++++-- src/Magnum/Math/Test/VectorTest.cpp | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Magnum/Math/Test/MatrixTest.cpp b/src/Magnum/Math/Test/MatrixTest.cpp index 80bbd64b3..8fdadce37 100644 --- a/src/Magnum/Math/Test/MatrixTest.cpp +++ b/src/Magnum/Math/Test/MatrixTest.cpp @@ -294,12 +294,14 @@ void MatrixTest::invertedOrthogonal() { template class BasicVec2: public Math::Vector<2, T> { public: - template constexpr BasicVec2(U&&... args): Math::Vector<2, T>{args...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr BasicVec2(U&&... args): Math::Vector<2, T>(args...) {} }; template class BasicMat2: public Math::Matrix<2, T> { public: - template constexpr BasicMat2(U&&... args): Math::Matrix<2, T>{args...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr BasicMat2(U&&... args): Math::Matrix<2, T>(args...) {} MAGNUM_MATRIX_SUBCLASS_IMPLEMENTATION(2, BasicMat2, BasicVec2) }; diff --git a/src/Magnum/Math/Test/RangeTest.cpp b/src/Magnum/Math/Test/RangeTest.cpp index a8d972acb..5fcd2c5b3 100644 --- a/src/Magnum/Math/Test/RangeTest.cpp +++ b/src/Magnum/Math/Test/RangeTest.cpp @@ -448,7 +448,8 @@ void RangeTest::scaled() { template class BasicRect: public Math::Range<2, T> { public: - template constexpr BasicRect(U&&... args): Math::Range<2, T>{args...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr BasicRect(U&&... args): Math::Range<2, T>(args...) {} MAGNUM_RANGE_SUBCLASS_IMPLEMENTATION(2, BasicRect, Vector2) }; diff --git a/src/Magnum/Math/Test/RectangularMatrixTest.cpp b/src/Magnum/Math/Test/RectangularMatrixTest.cpp index 6b9436176..6424915c5 100644 --- a/src/Magnum/Math/Test/RectangularMatrixTest.cpp +++ b/src/Magnum/Math/Test/RectangularMatrixTest.cpp @@ -438,7 +438,8 @@ void RectangularMatrixTest::vector() { template class BasicMat: public Math::RectangularMatrix { public: - template constexpr BasicMat(U&&... args): Math::RectangularMatrix{args...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr BasicMat(U&&... args): Math::RectangularMatrix(args...) {} MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(size, size, BasicMat) }; @@ -447,7 +448,8 @@ MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(BasicMat) template class BasicMat2x2: public BasicMat<2, T> { public: - template constexpr BasicMat2x2(U&&... args): BasicMat<2, T>{args...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr BasicMat2x2(U&&... args): BasicMat<2, T>(args...) {} MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(2, 2, BasicMat2x2) }; diff --git a/src/Magnum/Math/Test/VectorTest.cpp b/src/Magnum/Math/Test/VectorTest.cpp index d9e5c4849..c99f2ed05 100644 --- a/src/Magnum/Math/Test/VectorTest.cpp +++ b/src/Magnum/Math/Test/VectorTest.cpp @@ -468,7 +468,8 @@ void VectorTest::angle() { template class BasicVec2: public Math::Vector<2, T> { public: - template constexpr BasicVec2(U&&... args): Math::Vector<2, T>{args...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr BasicVec2(U&&... args): Math::Vector<2, T>(args...) {} MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(2, BasicVec2) };