Vladimír Vondruš 8 years ago
parent
commit
7df90af144
  1. 10
      src/Magnum/Math/Test/BezierTest.cpp
  2. 6
      src/Magnum/Math/Test/Matrix3Test.cpp
  3. 7
      src/Magnum/Math/Test/Matrix4Test.cpp

10
src/Magnum/Math/Test/BezierTest.cpp

@ -144,7 +144,12 @@ void BezierTest::constructNoInit() {
}
void BezierTest::constructConversion() {
#ifndef CORRADE_MSVC2017_COMPATIBILITY
constexpr QuadraticBezier2Dd a{Vector2d{0.5, 1.0}, Vector2d{1.1, 0.3}, Vector2d{0.1, 1.2}};
#else
/* https://developercommunity.visualstudio.com/content/problem/259204/1572-regression-ice-in-constexpr-code-involving-de.html */
constexpr QuadraticBezier2Dd a{Vector<2, Double>{0.5, 1.0}, Vector<2, Double>{1.1, 0.3}, Vector<2, Double>{0.1, 1.2}};
#endif
constexpr QuadraticBezier2D b{a};
CORRADE_COMPARE(b, (QuadraticBezier2D{Vector2{0.5f, 1.0f}, Vector2{1.1f, 0.3f}, Vector2{0.1f, 1.2f}}));
@ -166,7 +171,12 @@ void BezierTest::constructCopy() {
void BezierTest::convert() {
constexpr QBezier2D a{0.5f, 1.1f, 0.1f, 1.0f, 0.3f, 1.2f};
#ifndef CORRADE_MSVC2017_COMPATIBILITY
constexpr QuadraticBezier2D b{Vector2{0.5f, 1.0f}, Vector2{1.1f, 0.3f}, Vector2{0.1f, 1.2f}};
#else
/* https://developercommunity.visualstudio.com/content/problem/259204/1572-regression-ice-in-constexpr-code-involving-de.html */
constexpr QuadraticBezier2D b{Vector<2, Float>{0.5f, 1.0f}, Vector<2, Float>{1.1f, 0.3f}, Vector<2, Float>{0.1f, 1.2f}};
#endif
constexpr QuadraticBezier2D c{a};
CORRADE_COMPARE(c, b);

6
src/Magnum/Math/Test/Matrix3Test.cpp

@ -340,8 +340,14 @@ void Matrix3Test::projection() {
}
void Matrix3Test::fromParts() {
#ifndef CORRADE_MSVC2017_COMPATIBILITY
constexpr Matrix2x2 rotationScaling(Vector2(3.0f, 5.0f),
Vector2(4.0f, 4.0f));
#else
/* https://developercommunity.visualstudio.com/content/problem/259204/1572-regression-ice-in-constexpr-code-involving-de.html */
constexpr Matrix2x2 rotationScaling{Vector<2, Float>{3.0f, 5.0f},
Vector<2, Float>{4.0f, 4.0f}};
#endif
constexpr Vector2 translation(7.0f, -1.0f);
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Probably because copy is not constexpr */
constexpr

7
src/Magnum/Math/Test/Matrix4Test.cpp

@ -479,9 +479,16 @@ void Matrix4Test::perspectiveProjectionFovInfiniteFar() {
}
void Matrix4Test::fromParts() {
#ifndef CORRADE_MSVC2017_COMPATIBILITY
constexpr Matrix3x3 rotationScaling(Vector3(3.0f, 5.0f, 8.0f),
Vector3(4.0f, 4.0f, 7.0f),
Vector3(7.0f, -1.0f, 8.0f));
#else
/* https://developercommunity.visualstudio.com/content/problem/259204/1572-regression-ice-in-constexpr-code-involving-de.html */
constexpr Matrix3x3 rotationScaling{Vector<3, Float>{3.0f, 5.0f, 8.0f},
Vector<3, Float>{4.0f, 4.0f, 7.0f},
Vector<3, Float>{7.0f, -1.0f, 8.0f}};
#endif
constexpr Vector3 translation(9.0f, 4.0f, 5.0f);
#ifndef CORRADE_MSVC2015_COMPATIBILITY /* Probably because copy is not constexpr */
constexpr

Loading…
Cancel
Save