From 7af5e136fe1c8d4b5311da6a3be6c68e6c89f9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 25 Aug 2015 22:29:36 +0200 Subject: [PATCH] MSVC 2015 compatibility: {}-related issues. --- src/Magnum/Math/Color.h | 12 ++++++++---- src/Magnum/Math/RectangularMatrix.h | 3 ++- src/Magnum/SceneGraph/Camera.h | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index 07963ac70..ef01d0658 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -256,7 +256,8 @@ template class Color3: public Vector3 { constexpr /*implicit*/ Color3(ZeroInitT = ZeroInit) /** @todoc remove workaround when doxygen is sane */ #ifndef DOXYGEN_GENERATING_OUTPUT - : Vector3{ZeroInit} + /* MSVC 2015 can't handle {} here */ + : Vector3(ZeroInit) #endif {} @@ -264,7 +265,8 @@ template class Color3: public Vector3 { explicit Color3(NoInitT) /** @todoc remove workaround when doxygen is sane */ #ifndef DOXYGEN_GENERATING_OUTPUT - : Vector3{NoInit} + /* MSVC 2015 can't handle {} here */ + : Vector3(NoInit) #endif {} @@ -452,7 +454,8 @@ class Color4: public Vector4 { constexpr explicit Color4(ZeroInitT) /** @todoc remove workaround when doxygen is sane */ #ifndef DOXYGEN_GENERATING_OUTPUT - : Vector4{ZeroInit} + /* MSVC 2015 can't handle {} here */ + : Vector4(ZeroInit) #endif {} @@ -460,7 +463,8 @@ class Color4: public Vector4 { explicit Color4(NoInitT) /** @todoc remove workaround when doxygen is sane */ #ifndef DOXYGEN_GENERATING_OUTPUT - : Vector4{NoInit} + /* MSVC 2015 can't handle {} here */ + : Vector4(NoInit) #endif {} diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index abc5c9ae1..3da20b600 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -379,7 +379,8 @@ template class RectangularMatrix { template constexpr explicit RectangularMatrix(Implementation::Sequence, const RectangularMatrix& matrix): _data{Vector(matrix[sequence])...} {} /* Implementation for RectangularMatrix::RectangularMatrix(ZeroInitT) and RectangularMatrix::RectangularMatrix(NoInitT) */ - template constexpr explicit RectangularMatrix(Implementation::Sequence, U): _data{Vector{(static_cast(sequence), U{})}...} {} + /* MSVC 2015 can't handle {} here */ + template constexpr explicit RectangularMatrix(Implementation::Sequence, U): _data{Vector((static_cast(sequence), U{}))...} {} template constexpr Vector diagonalInternal(Implementation::Sequence) const; diff --git a/src/Magnum/SceneGraph/Camera.h b/src/Magnum/SceneGraph/Camera.h index 0569e3eac..439c512ad 100644 --- a/src/Magnum/SceneGraph/Camera.h +++ b/src/Magnum/SceneGraph/Camera.h @@ -106,7 +106,8 @@ template class Camera: public AbstractFeature, U>::value>::type> Camera(U& object): Camera{static_cast&>(object)} {} + /* MSVC 2015 can't handle {} here */ + template, U>::value>::type> Camera(U& object): Camera(static_cast&>(object)) {} #endif ~Camera();