Browse Source

MSVC 2015 compatibility: {}-related issues.

pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
7af5e136fe
  1. 12
      src/Magnum/Math/Color.h
  2. 3
      src/Magnum/Math/RectangularMatrix.h
  3. 3
      src/Magnum/SceneGraph/Camera.h

12
src/Magnum/Math/Color.h

@ -256,7 +256,8 @@ template<class T> class Color3: public Vector3<T> {
constexpr /*implicit*/ Color3(ZeroInitT = ZeroInit) constexpr /*implicit*/ Color3(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
: Vector3<T>{ZeroInit} /* MSVC 2015 can't handle {} here */
: Vector3<T>(ZeroInit)
#endif #endif
{} {}
@ -264,7 +265,8 @@ template<class T> class Color3: public Vector3<T> {
explicit Color3(NoInitT) explicit Color3(NoInitT)
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
: Vector3<T>{NoInit} /* MSVC 2015 can't handle {} here */
: Vector3<T>(NoInit)
#endif #endif
{} {}
@ -452,7 +454,8 @@ class Color4: public Vector4<T> {
constexpr explicit Color4(ZeroInitT) constexpr explicit Color4(ZeroInitT)
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
: Vector4<T>{ZeroInit} /* MSVC 2015 can't handle {} here */
: Vector4<T>(ZeroInit)
#endif #endif
{} {}
@ -460,7 +463,8 @@ class Color4: public Vector4<T> {
explicit Color4(NoInitT) explicit Color4(NoInitT)
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
: Vector4<T>{NoInit} /* MSVC 2015 can't handle {} here */
: Vector4<T>(NoInit)
#endif #endif
{} {}

3
src/Magnum/Math/RectangularMatrix.h

@ -379,7 +379,8 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
template<class U, std::size_t ...sequence> constexpr explicit RectangularMatrix(Implementation::Sequence<sequence...>, const RectangularMatrix<cols, rows, U>& matrix): _data{Vector<rows, T>(matrix[sequence])...} {} template<class U, std::size_t ...sequence> constexpr explicit RectangularMatrix(Implementation::Sequence<sequence...>, const RectangularMatrix<cols, rows, U>& matrix): _data{Vector<rows, T>(matrix[sequence])...} {}
/* Implementation for RectangularMatrix<cols, rows, T>::RectangularMatrix(ZeroInitT) and RectangularMatrix<cols, rows, T>::RectangularMatrix(NoInitT) */ /* Implementation for RectangularMatrix<cols, rows, T>::RectangularMatrix(ZeroInitT) and RectangularMatrix<cols, rows, T>::RectangularMatrix(NoInitT) */
template<class U, std::size_t ...sequence> constexpr explicit RectangularMatrix(Implementation::Sequence<sequence...>, U): _data{Vector<rows, T>{(static_cast<void>(sequence), U{})}...} {} /* MSVC 2015 can't handle {} here */
template<class U, std::size_t ...sequence> constexpr explicit RectangularMatrix(Implementation::Sequence<sequence...>, U): _data{Vector<rows, T>((static_cast<void>(sequence), U{}))...} {}
template<std::size_t ...sequence> constexpr Vector<DiagonalSize, T> diagonalInternal(Implementation::Sequence<sequence...>) const; template<std::size_t ...sequence> constexpr Vector<DiagonalSize, T> diagonalInternal(Implementation::Sequence<sequence...>) const;

3
src/Magnum/SceneGraph/Camera.h

@ -106,7 +106,8 @@ template<UnsignedInt dimensions, class T> class Camera: public AbstractFeature<d
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* This is here to avoid ambiguity with deleted copy constructor when /* This is here to avoid ambiguity with deleted copy constructor when
passing `*this` from class subclassing both Camera and AbstractObject */ passing `*this` from class subclassing both Camera and AbstractObject */
template<class U, class = typename std::enable_if<std::is_base_of<AbstractObject<dimensions, T>, U>::value>::type> Camera(U& object): Camera<dimensions, T>{static_cast<AbstractObject<dimensions, T>&>(object)} {} /* MSVC 2015 can't handle {} here */
template<class U, class = typename std::enable_if<std::is_base_of<AbstractObject<dimensions, T>, U>::value>::type> Camera(U& object): Camera<dimensions, T>(static_cast<AbstractObject<dimensions, T>&>(object)) {}
#endif #endif
~Camera(); ~Camera();

Loading…
Cancel
Save