Browse Source

Remove most of the "MSVC 2015 can't handle {} here" workarounds.

pull/197/head
Vladimír Vondruš 9 years ago
parent
commit
ae9095de16
  1. 3
      src/Magnum/DebugTools/ObjectRenderer.cpp
  2. 32
      src/Magnum/Math/Angle.h
  3. 6
      src/Magnum/Math/Bezier.h
  4. 12
      src/Magnum/Math/Color.h
  5. 10
      src/Magnum/Math/DualComplex.h
  6. 11
      src/Magnum/Math/DualQuaternion.h
  7. 9
      src/Magnum/Math/Matrix.h
  8. 9
      src/Magnum/Math/Matrix3.h
  9. 9
      src/Magnum/Math/Matrix4.h
  10. 20
      src/Magnum/Math/Range.h
  11. 6
      src/Magnum/Math/RectangularMatrix.h
  12. 3
      src/Magnum/Math/Test/DualTest.cpp
  13. 6
      src/Magnum/Math/Test/MatrixTest.cpp
  14. 3
      src/Magnum/Math/Test/RangeTest.cpp
  15. 6
      src/Magnum/Math/Test/RectangularMatrixTest.cpp
  16. 3
      src/Magnum/Math/Test/VectorTest.cpp
  17. 6
      src/Magnum/Math/Vector2.h
  18. 6
      src/Magnum/Math/Vector3.h
  19. 6
      src/Magnum/Math/Vector4.h
  20. 3
      src/Magnum/SceneGraph/Camera.h

3
src/Magnum/DebugTools/ObjectRenderer.cpp

@ -60,8 +60,7 @@ template<> struct Renderer<3> {
} }
/* MSVC 2015 can't handle {} here */ template<UnsignedInt dimensions> ObjectRenderer<dimensions>::ObjectRenderer(SceneGraph::AbstractObject<dimensions, Float>& object, ResourceKey options, SceneGraph::DrawableGroup<dimensions, Float>* drawables): SceneGraph::Drawable<dimensions, Float>{object, drawables}, _options{ResourceManager::instance().get<ObjectRendererOptions>(options)} {
template<UnsignedInt dimensions> ObjectRenderer<dimensions>::ObjectRenderer(SceneGraph::AbstractObject<dimensions, Float>& object, ResourceKey options, SceneGraph::DrawableGroup<dimensions, Float>* drawables): SceneGraph::Drawable<dimensions, Float>(object, drawables), _options{ResourceManager::instance().get<ObjectRendererOptions>(options)} {
/* Shader */ /* Shader */
_shader = ResourceManager::instance().get<AbstractShaderProgram, Shaders::VertexColor<dimensions>>(Renderer<dimensions>::shader()); _shader = ResourceManager::instance().get<AbstractShaderProgram, Shaders::VertexColor<dimensions>>(Renderer<dimensions>::shader());
if(!_shader) ResourceManager::instance().set<AbstractShaderProgram>(_shader.key(), new Shaders::VertexColor<dimensions>); if(!_shader) ResourceManager::instance().set<AbstractShaderProgram>(_shader.key(), new Shaders::VertexColor<dimensions>);

32
src/Magnum/Math/Angle.h

@ -126,12 +126,20 @@ std::sin(Float(Rad<Float>(b)); // required explicit conversion hints to user
template<class T> class Deg: public Unit<Deg, T> { template<class T> class Deg: public Unit<Deg, T> {
public: public:
/** @brief Construct zero angle */ /** @brief Construct zero angle */
/* MSVC 2015 can't handle {} here */ constexpr /*implicit*/ Deg(ZeroInitT = ZeroInit) noexcept
constexpr /*implicit*/ Deg(ZeroInitT = ZeroInit) noexcept: Unit<Math::Deg, T>(ZeroInit) {} /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Deg, T>{ZeroInit}
#endif
{}
/** @brief Construct without initializing the contents */ /** @brief Construct without initializing the contents */
/* MSVC 2015 can't handle {} here */ explicit Deg(NoInitT) noexcept
explicit Deg(NoInitT) noexcept: Unit<Math::Deg, T>(NoInit) {} /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Deg, T>{NoInit}
#endif
{}
/** @brief Explicit constructor from unitless type */ /** @brief Explicit constructor from unitless type */
constexpr explicit Deg(T value) noexcept: Unit<Math::Deg, T>(value) {} constexpr explicit Deg(T value) noexcept: Unit<Math::Deg, T>(value) {}
@ -190,12 +198,20 @@ See @ref Deg for more information.
template<class T> class Rad: public Unit<Rad, T> { template<class T> class Rad: public Unit<Rad, T> {
public: public:
/** @brief Default constructor */ /** @brief Default constructor */
/* MSVC 2015 can't handle {} here */ constexpr /*implicit*/ Rad(ZeroInitT = ZeroInit) noexcept
constexpr /*implicit*/ Rad(ZeroInitT = ZeroInit) noexcept: Unit<Math::Rad, T>(ZeroInit) {} /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Rad, T>{ZeroInit}
#endif
{}
/** @brief Construct without initializing the contents */ /** @brief Construct without initializing the contents */
/* MSVC 2015 can't handle {} here */ explicit Rad(NoInitT) noexcept
explicit Rad(NoInitT) noexcept: Unit<Math::Rad, T>(NoInit) {} /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Rad, T>{NoInit}
#endif
{}
/** @brief Construct from unitless type */ /** @brief Construct from unitless type */
constexpr explicit Rad(T value) noexcept: Unit<Math::Rad, T>(value) {} constexpr explicit Rad(T value) noexcept: Unit<Math::Rad, T>(value) {}

6
src/Magnum/Math/Bezier.h

@ -72,8 +72,7 @@ template<UnsignedInt order, UnsignedInt dimensions, class T> class Bezier {
constexpr /*implicit*/ Bezier(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Bezier(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Bezier<order, dimensions, T>{typename Implementation::GenerateSequence<order + 1>::Type{}, ZeroInit}
: Bezier<order, dimensions, T>(typename Implementation::GenerateSequence<order + 1>::Type{}, ZeroInit)
#endif #endif
{} {}
@ -81,8 +80,7 @@ template<UnsignedInt order, UnsignedInt dimensions, class T> class Bezier {
explicit Bezier(NoInitT) noexcept explicit Bezier(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Bezier<order, dimensions, T>{typename Implementation::GenerateSequence<order + 1>::Type{}, NoInit}
: Bezier<order, dimensions, T>(typename Implementation::GenerateSequence<order + 1>::Type{}, NoInit)
#endif #endif
{} {}

12
src/Magnum/Math/Color.h

@ -420,8 +420,7 @@ template<class T> class Color3: public Vector3<T> {
constexpr /*implicit*/ Color3(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Color3(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector3<T>{ZeroInit}
: Vector3<T>(ZeroInit)
#endif #endif
{} {}
@ -429,8 +428,7 @@ template<class T> class Color3: public Vector3<T> {
explicit Color3(NoInitT) noexcept explicit Color3(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector3<T>{NoInit}
: Vector3<T>(NoInit)
#endif #endif
{} {}
@ -803,8 +801,7 @@ class Color4: public Vector4<T> {
constexpr explicit Color4(ZeroInitT) noexcept constexpr explicit Color4(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector4<T>{ZeroInit}
: Vector4<T>(ZeroInit)
#endif #endif
{} {}
@ -812,8 +809,7 @@ class Color4: public Vector4<T> {
explicit Color4(NoInitT) noexcept explicit Color4(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector4<T>{NoInit}
: Vector4<T>(NoInit)
#endif #endif
{} {}

10
src/Magnum/Math/DualComplex.h

@ -113,8 +113,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
constexpr explicit DualComplex(ZeroInitT) noexcept constexpr explicit DualComplex(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Dual<Complex<T>>{Complex<T>{ZeroInit}, Complex<T>{ZeroInit}}
: Dual<Complex<T>>(Complex<T>{ZeroInit}, Complex<T>{ZeroInit})
#endif #endif
{} {}
@ -122,8 +121,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
explicit DualComplex(NoInitT) noexcept explicit DualComplex(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Dual<Complex<T>>{NoInit}
: Dual<Complex<T>>(NoInit)
#endif #endif
{} {}
@ -159,9 +157,9 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
* else. * else.
*/ */
template<class U> constexpr explicit DualComplex(const DualComplex<U>& other) noexcept template<class U> constexpr explicit DualComplex(const DualComplex<U>& other) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Dual<Complex<T>>{other}
: Dual<Complex<T>>(other)
#endif #endif
{} {}

11
src/Magnum/Math/DualQuaternion.h

@ -167,7 +167,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
constexpr /*implicit*/ DualQuaternion(IdentityInitT = IdentityInit) noexcept constexpr /*implicit*/ DualQuaternion(IdentityInitT = IdentityInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>({}, {{}, T(0)}) : Dual<Quaternion<T>>{{}, {{}, T(0)}}
#endif #endif
{} {}
@ -175,8 +175,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
constexpr explicit DualQuaternion(ZeroInitT) noexcept constexpr explicit DualQuaternion(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Dual<Quaternion<T>>{Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit}}
: Dual<Quaternion<T>>(Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit})
#endif #endif
{} {}
@ -184,8 +183,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
explicit DualQuaternion(NoInitT) noexcept explicit DualQuaternion(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Dual<Quaternion<T>>{NoInit}
: Dual<Quaternion<T>>(NoInit)
#endif #endif
{} {}
@ -207,8 +205,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
*/ */
constexpr /*implicit*/ DualQuaternion(const Dual<Vector3<T>>& vector, const Dual<T>& scalar) noexcept constexpr /*implicit*/ DualQuaternion(const Dual<Vector3<T>>& vector, const Dual<T>& scalar) noexcept
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Dual<Quaternion<T>>{{vector.real(), scalar.real()}, {vector.dual(), scalar.dual()}}
: Dual<Quaternion<T>>({vector.real(), scalar.real()}, {vector.dual(), scalar.dual()})
#endif #endif
{} {}

9
src/Magnum/Math/Matrix.h

@ -86,8 +86,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
constexpr /*implicit*/ Matrix(IdentityInitT = IdentityInit, T value = T(1)) noexcept constexpr /*implicit*/ Matrix(IdentityInitT = IdentityInit, T value = T(1)) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : RectangularMatrix<size, size, T>{typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)}
: RectangularMatrix<size, size, T>(typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value))
#endif #endif
{} {}
@ -95,8 +94,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
constexpr explicit Matrix(ZeroInitT) noexcept constexpr explicit Matrix(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : RectangularMatrix<size, size, T>{ZeroInit}
: RectangularMatrix<size, size, T>(ZeroInit)
#endif #endif
{} {}
@ -104,8 +102,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
constexpr explicit Matrix(NoInitT) noexcept constexpr explicit Matrix(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : RectangularMatrix<size, size, T>{NoInit}
: RectangularMatrix<size, size, T>(NoInit)
#endif #endif
{} {}

9
src/Magnum/Math/Matrix3.h

@ -204,8 +204,7 @@ template<class T> class Matrix3: public Matrix3x3<T> {
constexpr /*implicit*/ Matrix3(IdentityInitT = IdentityInit, T value = T{1}) noexcept constexpr /*implicit*/ Matrix3(IdentityInitT = IdentityInit, T value = T{1}) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Matrix3x3<T>{IdentityInit, value}
: Matrix3x3<T>(IdentityInit, value)
#endif #endif
{} {}
@ -213,8 +212,7 @@ template<class T> class Matrix3: public Matrix3x3<T> {
constexpr explicit Matrix3(ZeroInitT) noexcept constexpr explicit Matrix3(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Matrix3x3<T>{ZeroInit}
: Matrix3x3<T>(ZeroInit)
#endif #endif
{} {}
@ -222,8 +220,7 @@ template<class T> class Matrix3: public Matrix3x3<T> {
constexpr explicit Matrix3(NoInitT) noexcept constexpr explicit Matrix3(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Matrix3x3<T>{NoInit}
: Matrix3x3<T>(NoInit)
#endif #endif
{} {}

9
src/Magnum/Math/Matrix4.h

@ -375,8 +375,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
constexpr /*implicit*/ Matrix4(IdentityInitT = IdentityInit, T value = T{1}) noexcept constexpr /*implicit*/ Matrix4(IdentityInitT = IdentityInit, T value = T{1}) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Matrix4x4<T>{IdentityInit, value}
: Matrix4x4<T>(IdentityInit, value)
#endif #endif
{} {}
@ -384,8 +383,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
constexpr explicit Matrix4(ZeroInitT) noexcept constexpr explicit Matrix4(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Matrix4x4<T>{ZeroInit}
: Matrix4x4<T>(ZeroInit)
#endif #endif
{} {}
@ -393,8 +391,7 @@ template<class T> class Matrix4: public Matrix4x4<T> {
constexpr explicit Matrix4(NoInitT) noexcept constexpr explicit Matrix4(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Matrix4x4<T>{NoInit}
: Matrix4x4<T>(NoInit)
#endif #endif
{} {}

20
src/Magnum/Math/Range.h

@ -234,8 +234,7 @@ template<class T> class Range2D: public Range<2, T> {
constexpr /*implicit*/ Range2D(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Range2D(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Range<2, T>{ZeroInit}
: Range<2, T>(ZeroInit)
#endif #endif
{} {}
@ -243,8 +242,7 @@ template<class T> class Range2D: public Range<2, T> {
explicit Range2D(NoInitT) noexcept explicit Range2D(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Range<2, T>{NoInit}
: Range<2, T>(NoInit)
#endif #endif
{} {}
@ -266,9 +264,9 @@ template<class T> class Range2D: public Range<2, T> {
#endif #endif
> >
constexpr explicit Range2D(const U& other) constexpr explicit Range2D(const U& other)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Range<2, T>{Implementation::RangeConverter<2, T, U>::from(other)}
: Range<2, T>(Implementation::RangeConverter<2, T, U>::from(other))
#endif #endif
{} {}
@ -368,8 +366,7 @@ template<class T> class Range3D: public Range<3, T> {
constexpr /*implicit*/ Range3D(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Range3D(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Range<3, T>{ZeroInit}
: Range<3, T>(ZeroInit)
#endif #endif
{} {}
@ -377,8 +374,7 @@ template<class T> class Range3D: public Range<3, T> {
explicit Range3D(NoInitT) noexcept explicit Range3D(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Range<3, T>{NoInit}
: Range<3, T>(NoInit)
#endif #endif
{} {}
@ -393,9 +389,9 @@ template<class T> class Range3D: public Range<3, T> {
* @todoc Remove workaround when Doxygen no longer chokes on that line * @todoc Remove workaround when Doxygen no longer chokes on that line
*/ */
template<class U, class V = decltype(Implementation::RangeConverter<3, T, U>::from(std::declval<U>()))> constexpr explicit Range3D(const U& other) noexcept template<class U, class V = decltype(Implementation::RangeConverter<3, T, U>::from(std::declval<U>()))> constexpr explicit Range3D(const U& other) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Range<3, T>{Implementation::RangeConverter<3, T, U>::from(other)}
: Range<3, T>(Implementation::RangeConverter<3, T, U>::from(other))
#endif #endif
{} {}

6
src/Magnum/Math/RectangularMatrix.h

@ -111,8 +111,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
constexpr /*implicit*/ RectangularMatrix(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ RectangularMatrix(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit}
: RectangularMatrix<cols, rows, T>(typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit)
#endif #endif
{} {}
@ -120,8 +119,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
explicit RectangularMatrix(NoInitT) noexcept explicit RectangularMatrix(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, NoInit}
: RectangularMatrix<cols, rows, T>(typename Implementation::GenerateSequence<cols>::Type{}, NoInit)
#endif #endif
{} {}

3
src/Magnum/Math/Test/DualTest.cpp

@ -262,8 +262,7 @@ namespace {
template<class T> class BasicDualVec2: public Math::Dual<Math::Vector2<T>> { template<class T> class BasicDualVec2: public Math::Dual<Math::Vector2<T>> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicDualVec2(U&&... args): Math::Dual<Math::Vector2<T>>{args...} {}
template<class ...U> constexpr BasicDualVec2(U&&... args): Math::Dual<Math::Vector2<T>>(args...) {}
MAGNUM_DUAL_SUBCLASS_IMPLEMENTATION(BasicDualVec2, Math::Vector2, T) MAGNUM_DUAL_SUBCLASS_IMPLEMENTATION(BasicDualVec2, Math::Vector2, T)
MAGNUM_DUAL_SUBCLASS_MULTIPLICATION_IMPLEMENTATION(BasicDualVec2, Math::Vector2) MAGNUM_DUAL_SUBCLASS_MULTIPLICATION_IMPLEMENTATION(BasicDualVec2, Math::Vector2)

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

@ -350,14 +350,12 @@ void MatrixTest::invertedOrthogonal() {
template<class T> class BasicVec2: public Math::Vector<2, T> { template<class T> class BasicVec2: public Math::Vector<2, T> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicVec2(U&&... args): Math::Vector<2, T>{args...} {}
template<class ...U> constexpr BasicVec2(U&&... args): Math::Vector<2, T>(args...) {}
}; };
template<class T> class BasicMat2: public Math::Matrix<2, T> { template<class T> class BasicMat2: public Math::Matrix<2, T> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicMat2(U&&... args): Math::Matrix<2, T>{args...} {}
template<class ...U> constexpr BasicMat2(U&&... args): Math::Matrix<2, T>(args...) {}
MAGNUM_MATRIX_SUBCLASS_IMPLEMENTATION(2, BasicMat2, BasicVec2) MAGNUM_MATRIX_SUBCLASS_IMPLEMENTATION(2, BasicMat2, BasicVec2)
}; };

3
src/Magnum/Math/Test/RangeTest.cpp

@ -488,8 +488,7 @@ void RangeTest::join() {
template<class T> class BasicRect: public Math::Range<2, T> { template<class T> class BasicRect: public Math::Range<2, T> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicRect(U&&... args): Math::Range<2, T>{args...} {}
template<class ...U> constexpr BasicRect(U&&... args): Math::Range<2, T>(args...) {}
MAGNUM_RANGE_SUBCLASS_IMPLEMENTATION(2, BasicRect, Vector2) MAGNUM_RANGE_SUBCLASS_IMPLEMENTATION(2, BasicRect, Vector2)
}; };

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

@ -544,8 +544,7 @@ void RectangularMatrixTest::vector() {
template<std::size_t size, class T> class BasicMat: public Math::RectangularMatrix<size, size, T> { template<std::size_t size, class T> class BasicMat: public Math::RectangularMatrix<size, size, T> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicMat(U&&... args): Math::RectangularMatrix<size, size, T>{args...} {}
template<class ...U> constexpr BasicMat(U&&... args): Math::RectangularMatrix<size, size, T>(args...) {}
MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(size, size, BasicMat<size, T>) MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(size, size, BasicMat<size, T>)
}; };
@ -554,8 +553,7 @@ MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(BasicMat<size, T>)
template<class T> class BasicMat2x2: public BasicMat<2, T> { template<class T> class BasicMat2x2: public BasicMat<2, T> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicMat2x2(U&&... args): BasicMat<2, T>{args...} {}
template<class ...U> constexpr BasicMat2x2(U&&... args): BasicMat<2, T>(args...) {}
MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(2, 2, BasicMat2x2<T>) MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(2, 2, BasicMat2x2<T>)
}; };

3
src/Magnum/Math/Test/VectorTest.cpp

@ -517,8 +517,7 @@ void VectorTest::angle() {
template<class T> class BasicVec2: public Math::Vector<2, T> { template<class T> class BasicVec2: public Math::Vector<2, T> {
public: public:
/* MSVC 2015 can't handle {} here */ template<class ...U> constexpr BasicVec2(U&&... args): Math::Vector<2, T>{args...} {}
template<class ...U> constexpr BasicVec2(U&&... args): Math::Vector<2, T>(args...) {}
MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(2, BasicVec2) MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(2, BasicVec2)
}; };

6
src/Magnum/Math/Vector2.h

@ -115,8 +115,7 @@ template<class T> class Vector2: public Vector<2, T> {
constexpr /*implicit*/ Vector2(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Vector2(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector<2, T>{ZeroInit}
: Vector<2, T>(ZeroInit)
#endif #endif
{} {}
@ -124,8 +123,7 @@ template<class T> class Vector2: public Vector<2, T> {
explicit Vector2(NoInitT) noexcept explicit Vector2(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector<2, T>{NoInit}
: Vector<2, T>(NoInit)
#endif #endif
{} {}

6
src/Magnum/Math/Vector3.h

@ -137,8 +137,7 @@ template<class T> class Vector3: public Vector<3, T> {
constexpr /*implicit*/ Vector3(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Vector3(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector<3, T>{ZeroInit}
: Vector<3, T>(ZeroInit)
#endif #endif
{} {}
@ -146,8 +145,7 @@ template<class T> class Vector3: public Vector<3, T> {
explicit Vector3(NoInitT) noexcept explicit Vector3(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector<3, T>{NoInit}
: Vector<3, T>(NoInit)
#endif #endif
{} {}

6
src/Magnum/Math/Vector4.h

@ -63,8 +63,7 @@ template<class T> class Vector4: public Vector<4, T> {
constexpr /*implicit*/ Vector4(ZeroInitT = ZeroInit) noexcept constexpr /*implicit*/ Vector4(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector<4, T>{ZeroInit}
: Vector<4, T>(ZeroInit)
#endif #endif
{} {}
@ -72,8 +71,7 @@ template<class T> class Vector4: public Vector<4, T> {
explicit Vector4(NoInitT) noexcept explicit Vector4(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */ /** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* MSVC 2015 can't handle {} here */ : Vector<4, T>{NoInit}
: Vector<4, T>(NoInit)
#endif #endif
{} {}

3
src/Magnum/SceneGraph/Camera.h

@ -106,8 +106,7 @@ 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 */
/* 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)} {}
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