From 3b5e650af5b61a6b7ad8e2010e7c0d3e5d441fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 5 Jul 2015 16:08:37 +0200 Subject: [PATCH] Math: fix compilation of tests under libc++. std::forward() is not constexpr in C++11. --- src/Magnum/Math/Test/MatrixTest.cpp | 4 ++-- src/Magnum/Math/Test/RangeTest.cpp | 2 +- src/Magnum/Math/Test/RectangularMatrixTest.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Magnum/Math/Test/MatrixTest.cpp b/src/Magnum/Math/Test/MatrixTest.cpp index 15ee81c82..80bbd64b3 100644 --- a/src/Magnum/Math/Test/MatrixTest.cpp +++ b/src/Magnum/Math/Test/MatrixTest.cpp @@ -294,12 +294,12 @@ void MatrixTest::invertedOrthogonal() { template class BasicVec2: public Math::Vector<2, T> { public: - template constexpr BasicVec2(U&&... args): Math::Vector<2, T>{std::forward(args)...} {} + 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>{std::forward(args)...} {} + 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 0793732b3..a8d972acb 100644 --- a/src/Magnum/Math/Test/RangeTest.cpp +++ b/src/Magnum/Math/Test/RangeTest.cpp @@ -448,7 +448,7 @@ void RangeTest::scaled() { template class BasicRect: public Math::Range<2, T> { public: - template BasicRect(U&&... args): Math::Range<2, T>{std::forward(args)...} {} + 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 23c1f2d73..6b9436176 100644 --- a/src/Magnum/Math/Test/RectangularMatrixTest.cpp +++ b/src/Magnum/Math/Test/RectangularMatrixTest.cpp @@ -438,7 +438,7 @@ void RectangularMatrixTest::vector() { template class BasicMat: public Math::RectangularMatrix { public: - template constexpr BasicMat(U&&... args): Math::RectangularMatrix{std::forward(args)...} {} + template constexpr BasicMat(U&&... args): Math::RectangularMatrix{args...} {} MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(size, size, BasicMat) }; @@ -447,7 +447,7 @@ MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(BasicMat) template class BasicMat2x2: public BasicMat<2, T> { public: - template constexpr BasicMat2x2(U&&... args): BasicMat<2, T>{std::forward(args)...} {} + template constexpr BasicMat2x2(U&&... args): BasicMat<2, T>{args...} {} MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(2, 2, BasicMat2x2) };