Browse Source

Math: remove obsolete Doxygen workarounds.

pull/338/head
Vladimír Vondruš 7 years ago
parent
commit
3fb90cdf5c
  1. 28
      src/Magnum/Math/Angle.h
  2. 14
      src/Magnum/Math/Bezier.h
  3. 28
      src/Magnum/Math/Color.h
  4. 29
      src/Magnum/Math/DualComplex.h
  5. 31
      src/Magnum/Math/DualQuaternion.h
  6. 35
      src/Magnum/Math/Matrix.h
  7. 28
      src/Magnum/Math/Matrix3.h
  8. 28
      src/Magnum/Math/Matrix4.h
  9. 42
      src/Magnum/Math/Range.h
  10. 21
      src/Magnum/Math/RectangularMatrix.h
  11. 14
      src/Magnum/Math/Vector2.h
  12. 14
      src/Magnum/Math/Vector3.h
  13. 14
      src/Magnum/Math/Vector4.h

28
src/Magnum/Math/Angle.h

@ -106,20 +106,10 @@ template<class T> class Deg: public Unit<Deg, T> {
constexpr /*implicit*/ Deg() noexcept: Unit<Math::Deg, T>{ZeroInit} {}
/** @brief Construct a zero angle */
constexpr explicit Deg(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Deg, T>{ZeroInit}
#endif
{}
constexpr explicit Deg(ZeroInitT) noexcept: Unit<Math::Deg, T>{ZeroInit} {}
/** @brief Construct without initializing the contents */
explicit Deg(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Deg, T>{NoInit}
#endif
{}
explicit Deg(NoInitT) noexcept: Unit<Math::Deg, T>{NoInit} {}
/** @brief Explicit constructor from unitless type */
constexpr explicit Deg(T value) noexcept: Unit<Math::Deg, T>(value) {}
@ -185,20 +175,10 @@ template<class T> class Rad: public Unit<Rad, T> {
constexpr /*implicit*/ Rad() noexcept: Unit<Math::Rad, T>{ZeroInit} {}
/** @brief Constructor a zero angle */
constexpr explicit Rad(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Rad, T>{ZeroInit}
#endif
{}
constexpr explicit Rad(ZeroInitT) noexcept: Unit<Math::Rad, T>{ZeroInit} {}
/** @brief Construct without initializing the contents */
explicit Rad(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Unit<Math::Rad, T>{NoInit}
#endif
{}
explicit Rad(NoInitT) noexcept: Unit<Math::Rad, T>{NoInit} {}
/** @brief Construct from unitless type */
constexpr explicit Rad(T value) noexcept: Unit<Math::Rad, T>(value) {}

14
src/Magnum/Math/Bezier.h

@ -109,20 +109,10 @@ template<UnsignedInt order, UnsignedInt dimensions, class T> class Bezier {
*
* All control points are zero vectors.
*/
constexpr explicit Bezier(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Bezier<order, dimensions, T>{typename Implementation::GenerateSequence<order + 1>::Type{}, ZeroInit}
#endif
{}
constexpr explicit Bezier(ZeroInitT) noexcept: Bezier<order, dimensions, T>{typename Implementation::GenerateSequence<order + 1>::Type{}, ZeroInit} {}
/** @brief Construct Bézier without initializing the contents */
explicit Bezier(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Bezier<order, dimensions, T>{typename Implementation::GenerateSequence<order + 1>::Type{}, NoInit}
#endif
{}
explicit Bezier(NoInitT) noexcept: Bezier<order, dimensions, T>{typename Implementation::GenerateSequence<order + 1>::Type{}, NoInit} {}
/** @brief Construct Bézier curve with given array of control points */
template<typename... U> constexpr /*implicit*/ Bezier(const Vector<dimensions, T>& first, U... next) noexcept: _data{first, next...} {

28
src/Magnum/Math/Color.h

@ -437,20 +437,10 @@ template<class T> class Color3: public Vector3<T> {
*
* All components are set to zero.
*/
constexpr explicit Color3(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector3<T>{ZeroInit}
#endif
{}
constexpr explicit Color3(ZeroInitT) noexcept: Vector3<T>{ZeroInit} {}
/** @copydoc Vector::Vector(NoInitT) */
explicit Color3(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector3<T>{NoInit}
#endif
{}
explicit Color3(NoInitT) noexcept: Vector3<T>{NoInit} {}
/**
* @brief Gray constructor
@ -849,20 +839,10 @@ class Color4: public Vector4<T> {
*
* All components are set to zero.
*/
constexpr explicit Color4(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector4<T>{ZeroInit}
#endif
{}
constexpr explicit Color4(ZeroInitT) noexcept: Vector4<T>{ZeroInit} {}
/** @copydoc Vector::Vector(NoInitT) */
explicit Color4(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector4<T>{NoInit}
#endif
{}
explicit Color4(NoInitT) noexcept: Vector4<T>{NoInit} {}
/**
* @copydoc Color3::Color3(T)

29
src/Magnum/Math/DualComplex.h

@ -116,27 +116,13 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
* \hat c = (0 + i1) + \epsilon (0 + i0)
* @f]
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
constexpr explicit DualComplex(IdentityInitT) noexcept;
#else
constexpr explicit DualComplex(IdentityInitT) noexcept: Dual<Complex<T>>({}, {T(0), T(0)}) {}
#endif
/** @brief Construct zero-initialized dual complex number */
constexpr explicit DualComplex(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Complex<T>>{Complex<T>{ZeroInit}, Complex<T>{ZeroInit}}
#endif
{}
constexpr explicit DualComplex(ZeroInitT) noexcept: Dual<Complex<T>>{Complex<T>{ZeroInit}, Complex<T>{ZeroInit}} {}
/** @brief Construct without initializing the contents */
explicit DualComplex(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Complex<T>>{NoInit}
#endif
{}
explicit DualComplex(NoInitT) noexcept: Dual<Complex<T>>{NoInit} {}
/**
* @brief Construct dual complex number from real and dual part
@ -157,11 +143,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
* \hat c = (0 + i1) + \epsilon(v_x + iv_y)
* @f]
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
constexpr explicit DualComplex(const Vector2<T>& vector) noexcept;
#else
constexpr explicit DualComplex(const Vector2<T>& vector) noexcept: Dual<Complex<T>>({}, Complex<T>(vector)) {}
#endif
/**
* @brief Construct dual complex number from another of different type
@ -169,12 +151,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
* Performs only default casting on the values, no rounding or anything
* else.
*/
template<class U> constexpr explicit DualComplex(const DualComplex<U>& other) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Complex<T>>{other}
#endif
{}
template<class U> constexpr explicit DualComplex(const DualComplex<U>& other) noexcept: Dual<Complex<T>>{other} {}
/** @brief Construct dual complex number from external representation */
template<class U, class V = decltype(Implementation::DualComplexConverter<T, U>::from(std::declval<U>()))> constexpr explicit DualComplex(const U& other): DualComplex{Implementation::DualComplexConverter<T, U>::from(other)} {}

31
src/Magnum/Math/DualQuaternion.h

@ -256,28 +256,13 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
* \hat q = [\boldsymbol 0, 1] + \epsilon [\boldsymbol 0, 0]
* @f]
*/
constexpr explicit DualQuaternion(IdentityInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>{{}, {{}, T(0)}}
#endif
{}
constexpr explicit DualQuaternion(IdentityInitT) noexcept: Dual<Quaternion<T>>{{}, {{}, T(0)}} {}
/** @brief Construct zero-initialized dual quaternion */
constexpr explicit DualQuaternion(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>{Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit}}
#endif
{}
constexpr explicit DualQuaternion(ZeroInitT) noexcept: Dual<Quaternion<T>>{Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit}} {}
/** @brief Construct without initializing the contents */
explicit DualQuaternion(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>{NoInit}
#endif
{}
explicit DualQuaternion(NoInitT) noexcept: Dual<Quaternion<T>>{NoInit} {}
/**
* @brief Construct dual quaternion from real and dual part
@ -295,11 +280,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
* \hat q = [\hat{\boldsymbol v}, \hat s] = [\boldsymbol v_0, s_0] + \epsilon [\boldsymbol v_\epsilon, s_\epsilon]
* @f]
*/
constexpr /*implicit*/ DualQuaternion(const Dual<Vector3<T>>& vector, const Dual<T>& scalar) noexcept
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>{{vector.real(), scalar.real()}, {vector.dual(), scalar.dual()}}
#endif
{}
constexpr /*implicit*/ DualQuaternion(const Dual<Vector3<T>>& vector, const Dual<T>& scalar) noexcept: Dual<Quaternion<T>>{{vector.real(), scalar.real()}, {vector.dual(), scalar.dual()}} {}
/**
* @brief Construct dual quaternion from vector
@ -309,11 +290,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
* @f]
* @see @ref transformPointNormalized()
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
constexpr explicit DualQuaternion(const Vector3<T>& vector) noexcept;
#else
constexpr explicit DualQuaternion(const Vector3<T>& vector) noexcept: Dual<Quaternion<T>>({}, {vector, T(0)}) {}
#endif
/**
* @brief Construct dual quaternion from another of different type

35
src/Magnum/Math/Matrix.h

@ -75,39 +75,19 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
* Creates an identity matrix. @p value allows you to specify value on
* diagonal.
*/
constexpr explicit Matrix(IdentityInitT, T value = T(1)) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)}
#endif
{}
constexpr explicit Matrix(IdentityInitT, T value = T(1)) noexcept: RectangularMatrix<size, size, T>{typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)} {}
/** @copydoc RectangularMatrix::RectangularMatrix(ZeroInitT) */
constexpr explicit Matrix(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{ZeroInit}
#endif
{}
constexpr explicit Matrix(ZeroInitT) noexcept: RectangularMatrix<size, size, T>{ZeroInit} {}
/** @copydoc RectangularMatrix::RectangularMatrix(NoInitT) */
constexpr explicit Matrix(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{NoInit}
#endif
{}
constexpr explicit Matrix(NoInitT) noexcept: RectangularMatrix<size, size, T>{NoInit} {}
/** @brief Construct matrix from column vectors */
template<class ...U> constexpr /*implicit*/ Matrix(const Vector<size, T>& first, const U&... next) noexcept: RectangularMatrix<size, size, T>(first, next...) {}
/** @brief Construct matrix with one value for all elements */
constexpr explicit Matrix(T value) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{typename Implementation::GenerateSequence<size>::Type(), value}
#endif
{}
constexpr explicit Matrix(T value) noexcept: RectangularMatrix<size, size, T>{typename Implementation::GenerateSequence<size>::Type(), value} {}
/**
* @brief Construct matrix from another of different type
@ -129,12 +109,7 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
* columns and rows from it; if the other matrix is smaller, it's
* expanded to an identity (ones on diagonal, zeros elsewhere).
*/
template<std::size_t otherSize> constexpr explicit Matrix(const RectangularMatrix<otherSize, otherSize, T>& other) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix<size, T>{typename Implementation::GenerateSequence<size>::Type(), other}
#endif
{}
template<std::size_t otherSize> constexpr explicit Matrix(const RectangularMatrix<otherSize, otherSize, T>& other) noexcept: Matrix<size, T>{typename Implementation::GenerateSequence<size>::Type(), other} {}
/** @brief Copy constructor */
constexpr /*implicit*/ Matrix(const RectangularMatrix<size, size, T>& other) noexcept: RectangularMatrix<size, size, T>(other) {}

28
src/Magnum/Math/Matrix3.h

@ -208,39 +208,19 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* Creates an identity matrix. @p value allows you to specify value on
* diagonal.
*/
constexpr explicit Matrix3(IdentityInitT, T value = T{1}) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{IdentityInit, value}
#endif
{}
constexpr explicit Matrix3(IdentityInitT, T value = T{1}) noexcept: Matrix3x3<T>{IdentityInit, value} {}
/** @copydoc Matrix::Matrix(ZeroInitT) */
constexpr explicit Matrix3(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{ZeroInit}
#endif
{}
constexpr explicit Matrix3(ZeroInitT) noexcept: Matrix3x3<T>{ZeroInit} {}
/** @copydoc Matrix::Matrix(NoInitT) */
constexpr explicit Matrix3(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{NoInit}
#endif
{}
constexpr explicit Matrix3(NoInitT) noexcept: Matrix3x3<T>{NoInit} {}
/** @brief Construct matrix from column vectors */
constexpr /*implicit*/ Matrix3(const Vector3<T>& first, const Vector3<T>& second, const Vector3<T>& third) noexcept: Matrix3x3<T>(first, second, third) {}
/** @brief Construct matrix with one value for all elements */
constexpr explicit Matrix3(T value) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{value}
#endif
{}
constexpr explicit Matrix3(T value) noexcept: Matrix3x3<T>{value} {}
/** @copydoc Matrix::Matrix(const RectangularMatrix<size, size, U>&) */
template<class U> constexpr explicit Matrix3(const RectangularMatrix<3, 3, U>& other) noexcept: Matrix3x3<T>(other) {}

28
src/Magnum/Math/Matrix4.h

@ -393,39 +393,19 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* Creates an identity matrix. @p value allows you to specify value on
* diagonal.
*/
constexpr explicit Matrix4(IdentityInitT, T value = T{1}) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{IdentityInit, value}
#endif
{}
constexpr explicit Matrix4(IdentityInitT, T value = T{1}) noexcept: Matrix4x4<T>{IdentityInit, value} {}
/** @copydoc Matrix::Matrix(ZeroInitT) */
constexpr explicit Matrix4(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{ZeroInit}
#endif
{}
constexpr explicit Matrix4(ZeroInitT) noexcept: Matrix4x4<T>{ZeroInit} {}
/** @copydoc Matrix::Matrix(NoInitT) */
constexpr explicit Matrix4(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{NoInit}
#endif
{}
constexpr explicit Matrix4(NoInitT) noexcept: Matrix4x4<T>{NoInit} {}
/** @brief Construct matrix from column vectors */
constexpr /*implicit*/ Matrix4(const Vector4<T>& first, const Vector4<T>& second, const Vector4<T>& third, const Vector4<T>& fourth) noexcept: Matrix4x4<T>(first, second, third, fourth) {}
/** @brief Construct matrix with one value for all elements */
constexpr explicit Matrix4(T value) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{value}
#endif
{}
constexpr explicit Matrix4(T value) noexcept: Matrix4x4<T>{value} {}
/** @copydoc Matrix::Matrix(const RectangularMatrix<size, size, U>&) */
template<class U> constexpr explicit Matrix4(const RectangularMatrix<4, 4, U>& other) noexcept: Matrix4x4<T>(other) {}

42
src/Magnum/Math/Range.h

@ -366,20 +366,10 @@ template<class T> class Range2D: public Range<2, T> {
constexpr /*implicit*/ Range2D() noexcept: Range<2, T>{ZeroInit} {}
/** @copydoc Range(ZeroInitT) */
constexpr explicit Range2D(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<2, T>{ZeroInit}
#endif
{}
constexpr explicit Range2D(ZeroInitT) noexcept: Range<2, T>{ZeroInit} {}
/** @copydoc Range(NoInitT) */
explicit Range2D(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<2, T>{NoInit}
#endif
{}
explicit Range2D(NoInitT) noexcept: Range<2, T>{NoInit} {}
/** @copydoc Range(const VectorType&, const VectorType&) */
constexpr /*implicit*/ Range2D(const Vector2<T>& min, const Vector2<T>& max) noexcept: Range<2, T>(min, max) {}
@ -398,12 +388,7 @@ template<class T> class Range2D: public Range<2, T> {
decltype(Implementation::RangeConverter<2, T, U>())
#endif
>
constexpr explicit Range2D(const U& other)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<2, T>{Implementation::RangeConverter<2, T, U>::from(other)}
#endif
{}
constexpr explicit Range2D(const U& other): Range<2, T>{Implementation::RangeConverter<2, T, U>::from(other)} {}
/** @copydoc Range(const Range&) */
constexpr /*implicit*/ Range2D(const Range<2, T>& other) noexcept: Range<2, T>(other) {}
@ -516,20 +501,10 @@ template<class T> class Range3D: public Range<3, T> {
constexpr /*implicit*/ Range3D() noexcept: Range<3, T>{ZeroInit} {}
/** @copydoc Range(ZeroInitT) */
constexpr explicit Range3D(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<3, T>{ZeroInit}
#endif
{}
constexpr explicit Range3D(ZeroInitT) noexcept: Range<3, T>{ZeroInit} {}
/** @brief @copybrief Range(NoInitT) */
explicit Range3D(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<3, T>{NoInit}
#endif
{}
explicit Range3D(NoInitT) noexcept: Range<3, T>{NoInit} {}
/** @copydoc Range(const VectorType&, const VectorType&) */
constexpr /*implicit*/ Range3D(const Vector3<T>& min, const Vector3<T>& max) noexcept: Range<3, T>(min, max) {}
@ -541,12 +516,7 @@ template<class T> class Range3D: public Range<3, T> {
* @brief Construct range from external representation
* @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
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<3, T>{Implementation::RangeConverter<3, T, U>::from(other)}
#endif
{}
template<class U, class V = decltype(Implementation::RangeConverter<3, T, U>::from(std::declval<U>()))> constexpr explicit Range3D(const U& other) noexcept: Range<3, T>{Implementation::RangeConverter<3, T, U>::from(other)} {}
/** @copydoc Range(const Range&) */
constexpr /*implicit*/ Range3D(const Range<3, T>& other) noexcept: Range<3, T>(other) {}

21
src/Magnum/Math/RectangularMatrix.h

@ -115,20 +115,10 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
constexpr /*implicit*/ RectangularMatrix() noexcept: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit} {}
/** @brief Construct zero-filled matrix */
constexpr explicit RectangularMatrix(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit}
#endif
{}
constexpr explicit RectangularMatrix(ZeroInitT) noexcept: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit} {}
/** @brief Construct matrix without initializing the contents */
explicit RectangularMatrix(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, NoInit}
#endif
{}
explicit RectangularMatrix(NoInitT) noexcept: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, NoInit} {}
/** @brief Construct matrix from column vectors */
template<class ...U> constexpr /*implicit*/ RectangularMatrix(const Vector<rows, T>& first, const U&... next) noexcept: _data{first, next...} {
@ -136,12 +126,7 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
}
/** @brief Construct matrix with one value for all components */
constexpr explicit RectangularMatrix(T value) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix{typename Implementation::GenerateSequence<cols>::Type(), value}
#endif
{}
constexpr explicit RectangularMatrix(T value) noexcept: RectangularMatrix{typename Implementation::GenerateSequence<cols>::Type(), value} {}
/**
* @brief Construct matrix from another of different type

14
src/Magnum/Math/Vector2.h

@ -108,20 +108,10 @@ template<class T> class Vector2: public Vector<2, T> {
constexpr /*implicit*/ Vector2() noexcept: Vector<2, T>{ZeroInit} {}
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr explicit Vector2(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<2, T>{ZeroInit}
#endif
{}
constexpr explicit Vector2(ZeroInitT) noexcept: Vector<2, T>{ZeroInit} {}
/** @copydoc Vector::Vector(NoInitT) */
explicit Vector2(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<2, T>{NoInit}
#endif
{}
explicit Vector2(NoInitT) noexcept: Vector<2, T>{NoInit} {}
/** @copydoc Vector::Vector(T) */
constexpr explicit Vector2(T value) noexcept: Vector<2, T>(value) {}

14
src/Magnum/Math/Vector3.h

@ -129,20 +129,10 @@ template<class T> class Vector3: public Vector<3, T> {
constexpr /*implicit*/ Vector3() noexcept: Vector<3, T>{ZeroInit} {}
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr explicit Vector3(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<3, T>{ZeroInit}
#endif
{}
constexpr explicit Vector3(ZeroInitT) noexcept: Vector<3, T>{ZeroInit} {}
/** @copydoc Vector::Vector(NoInitT) */
explicit Vector3(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<3, T>{NoInit}
#endif
{}
explicit Vector3(NoInitT) noexcept: Vector<3, T>{NoInit} {}
/** @copydoc Vector::Vector(T) */
constexpr explicit Vector3(T value) noexcept: Vector<3, T>(value) {}

14
src/Magnum/Math/Vector4.h

@ -67,20 +67,10 @@ template<class T> class Vector4: public Vector<4, T> {
constexpr /*implicit*/ Vector4() noexcept: Vector<4, T>{ZeroInit} {}
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr explicit Vector4(ZeroInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<4, T>{ZeroInit}
#endif
{}
constexpr explicit Vector4(ZeroInitT) noexcept: Vector<4, T>{ZeroInit} {}
/** @copydoc Vector::Vector(NoInitT) */
explicit Vector4(NoInitT) noexcept
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<4, T>{NoInit}
#endif
{}
explicit Vector4(NoInitT) noexcept: Vector<4, T>{NoInit} {}
/** @copydoc Vector::Vector(T) */
constexpr explicit Vector4(T value) noexcept: Vector<4, T>(value) {}

Loading…
Cancel
Save