diff --git a/src/Magnum/Math/Bezier.h b/src/Magnum/Math/Bezier.h index 007159350..9edeac5cf 100644 --- a/src/Magnum/Math/Bezier.h +++ b/src/Magnum/Math/Bezier.h @@ -137,10 +137,10 @@ template class Bezier { template constexpr explicit Bezier(const Bezier& other) noexcept: Bezier{typename Containers::Implementation::GenerateSequence::Type{}, other} {} /** @brief Construct Bézier curve from external representation */ - template::from(std::declval()))> constexpr explicit Bezier(const U& other) noexcept: Bezier{Implementation::BezierConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit Bezier(const U& other) noexcept: Bezier{Implementation::BezierConverter::from(other)} {} /** @brief Convert Bézier curve to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::BezierConverter::to(*this); } diff --git a/src/Magnum/Math/BitVector.h b/src/Magnum/Math/BitVector.h index 2046615a7..dd8447282 100644 --- a/src/Magnum/Math/BitVector.h +++ b/src/Magnum/Math/BitVector.h @@ -125,10 +125,10 @@ template class BitVector { #endif /** @brief Construct a boolean vector from external representation */ - template::from(std::declval()))> constexpr explicit BitVector(const U& other) noexcept: BitVector{Implementation::BitVectorConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit BitVector(const U& other) noexcept: BitVector{Implementation::BitVectorConverter::from(other)} {} /** @brief Convert a boolean vector to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::BitVectorConverter::to(*this); } diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index 81ac7bf81..47b8dcb56 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -575,7 +575,7 @@ template class Color3: public Vector3 { constexpr explicit Color3(const BitVector3& other) noexcept: Vector3{other} {} /** @brief Construct color from external representation */ - template::from(std::declval())) #else @@ -1063,7 +1063,7 @@ class Color4: public Vector4 { constexpr explicit Color4(const BitVector4& other) noexcept: Vector4{other} {} /** @brief Construct color from external representation */ - template::from(std::declval())) #else diff --git a/src/Magnum/Math/Complex.h b/src/Magnum/Math/Complex.h index 10817445e..eac7cbb73 100644 --- a/src/Magnum/Math/Complex.h +++ b/src/Magnum/Math/Complex.h @@ -177,10 +177,10 @@ template class Complex { template constexpr explicit Complex(const Complex& other) noexcept: _real{T(other._real)}, _imaginary{T(other._imaginary)} {} /** @brief Construct a complex number from external representation */ - template::from(std::declval()))> constexpr explicit Complex(const U& other): Complex{Implementation::ComplexConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit Complex(const U& other): Complex{Implementation::ComplexConverter::from(other)} {} /** @brief Convert a complex number to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::ComplexConverter::to(*this); } diff --git a/src/Magnum/Math/DualComplex.h b/src/Magnum/Math/DualComplex.h index a6fd74242..7478a4536 100644 --- a/src/Magnum/Math/DualComplex.h +++ b/src/Magnum/Math/DualComplex.h @@ -183,13 +183,13 @@ template class DualComplex: public Dual> { template constexpr explicit DualComplex(const DualComplex& other) noexcept: Dual>{other} {} /** @brief Construct dual complex number from external representation */ - template::from(std::declval()))> constexpr explicit DualComplex(const U& other): DualComplex{Implementation::DualComplexConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit DualComplex(const U& other): DualComplex{Implementation::DualComplexConverter::from(other)} {} /** @brief Copy constructor */ constexpr /*implicit*/ DualComplex(const Dual>& other) noexcept: Dual>(other) {} /** @brief Convert dual complex number to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::DualComplexConverter::to(*this); } diff --git a/src/Magnum/Math/DualQuaternion.h b/src/Magnum/Math/DualQuaternion.h index c5c77e9f3..7d61ca0af 100644 --- a/src/Magnum/Math/DualQuaternion.h +++ b/src/Magnum/Math/DualQuaternion.h @@ -329,13 +329,13 @@ template class DualQuaternion: public Dual> { template constexpr explicit DualQuaternion(const DualQuaternion& other) noexcept: Dual>(other) {} /** @brief Construct dual quaternion from external representation */ - template::from(std::declval()))> constexpr explicit DualQuaternion(const U& other): DualQuaternion{Implementation::DualQuaternionConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit DualQuaternion(const U& other): DualQuaternion{Implementation::DualQuaternionConverter::from(other)} {} /** @brief Copy constructor */ constexpr /*implicit*/ DualQuaternion(const Dual>& other) noexcept: Dual>(other) {} /** @brief Convert dual quaternion to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::DualQuaternionConverter::to(*this); } diff --git a/src/Magnum/Math/Frustum.h b/src/Magnum/Math/Frustum.h index 84003c5bb..96449d631 100644 --- a/src/Magnum/Math/Frustum.h +++ b/src/Magnum/Math/Frustum.h @@ -113,10 +113,10 @@ template class Frustum { template constexpr explicit Frustum(const Frustum& other) noexcept; /** @brief Construct frustum from external representation */ - template::from(std::declval()))> constexpr explicit Frustum(const U& other) noexcept: Frustum{Implementation::FrustumConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit Frustum(const U& other) noexcept: Frustum{Implementation::FrustumConverter::from(other)} {} /** @brief Convert frustum to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::FrustumConverter::to(*this); } diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index ff082747f..704f67d4a 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -100,7 +100,7 @@ template class Matrix: public RectangularMatrix constexpr explicit Matrix(const RectangularMatrix& other) noexcept: RectangularMatrix(other) {} /** @brief Construct matrix from external representation */ - template::from(std::declval()))> constexpr explicit Matrix(const U& other): RectangularMatrix(Implementation::RectangularMatrixConverter::from(other)) {} + template::from(std::declval()))> constexpr explicit Matrix(const U& other): RectangularMatrix(Implementation::RectangularMatrixConverter::from(other)) {} /** @copydoc RectangularMatrix::RectangularMatrix(IdentityInitT, const RectangularMatrix&, T) */ template constexpr explicit Matrix(IdentityInitT, const RectangularMatrix& other, T value = T(1)) noexcept: RectangularMatrix{IdentityInit, other, value} {} diff --git a/src/Magnum/Math/Matrix3.h b/src/Magnum/Math/Matrix3.h index 1957bbee9..060ff7d65 100644 --- a/src/Magnum/Math/Matrix3.h +++ b/src/Magnum/Math/Matrix3.h @@ -305,7 +305,7 @@ template class Matrix3: public Matrix3x3 { template constexpr explicit Matrix3(const RectangularMatrix<3, 3, U>& other) noexcept: Matrix3x3(other) {} /** @brief Construct a matrix from external representation */ - template::from(std::declval()))> constexpr explicit Matrix3(const U& other) noexcept: Matrix3x3(Implementation::RectangularMatrixConverter<3, 3, T, U>::from(other)) {} + template::from(std::declval()))> constexpr explicit Matrix3(const U& other) noexcept: Matrix3x3(Implementation::RectangularMatrixConverter<3, 3, T, U>::from(other)) {} /** @copydoc RectangularMatrix::RectangularMatrix(IdentityInitT, const RectangularMatrix&, T) */ template constexpr explicit Matrix3(IdentityInitT, const RectangularMatrix& other, T value = T(1)) noexcept: Matrix3x3{IdentityInit, other, value} {} diff --git a/src/Magnum/Math/Matrix4.h b/src/Magnum/Math/Matrix4.h index 236951150..85b7873ee 100644 --- a/src/Magnum/Math/Matrix4.h +++ b/src/Magnum/Math/Matrix4.h @@ -571,7 +571,7 @@ template class Matrix4: public Matrix4x4 { template constexpr explicit Matrix4(const RectangularMatrix<4, 4, U>& other) noexcept: Matrix4x4(other) {} /** @brief Construct a matrix from external representation */ - template::from(std::declval()))> constexpr explicit Matrix4(const U& other): Matrix4x4(Implementation::RectangularMatrixConverter<4, 4, T, U>::from(other)) {} + template::from(std::declval()))> constexpr explicit Matrix4(const U& other): Matrix4x4(Implementation::RectangularMatrixConverter<4, 4, T, U>::from(other)) {} /** @copydoc RectangularMatrix::RectangularMatrix(IdentityInitT, const RectangularMatrix&, T) */ template constexpr explicit Matrix4(IdentityInitT, const RectangularMatrix& other, T value = T(1)) noexcept: Matrix4x4{IdentityInit, other, value} {} diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index aded8442f..f776953cd 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -408,10 +408,10 @@ template class Quaternion { template constexpr explicit Quaternion(const Quaternion& other) noexcept: _vector{other._vector}, _scalar{T(other._scalar)} {} /** @brief Construct quaternion from external representation */ - template::from(std::declval()))> constexpr explicit Quaternion(const U& other): Quaternion{Implementation::QuaternionConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit Quaternion(const U& other): Quaternion{Implementation::QuaternionConverter::from(other)} {} /** @brief Convert quaternion to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::QuaternionConverter::to(*this); } diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 6154f2f6a..47e85b33c 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -175,10 +175,10 @@ template class Range { template constexpr explicit Range(const Range& other) noexcept: _min(other._min), _max(other._max) {} /** @brief Construct range from external representation */ - template::from(std::declval()))> constexpr explicit Range(const U& other): Range{Implementation::RangeConverter::from(other)} {} + template::from(std::declval()))> constexpr explicit Range(const U& other): Range{Implementation::RangeConverter::from(other)} {} /** @brief Convert range to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::RangeConverter::to(*this); } @@ -470,7 +470,7 @@ template class Range2D: public Range<2, T> { /** * @brief Construct range from external representation */ - template::from(std::declval())) #else @@ -621,7 +621,7 @@ template class Range3D: public Range<3, T> { /** * @brief Construct range from external representation */ - template::from(std::declval()))> constexpr explicit Range3D(const U& other) noexcept: Range<3, T>{Implementation::RangeConverter<3, T, U>::from(other)} {} + template::from(std::declval()))> constexpr explicit Range3D(const U& other) noexcept: Range<3, T>{Implementation::RangeConverter<3, T, U>::from(other)} {} /** @brief Copy constructor */ constexpr /*implicit*/ Range3D(const Range<3, T>& other) noexcept: Range<3, T>(other) {} diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index 108710bd9..3f8701dc9 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -213,10 +213,10 @@ template class RectangularMatrix { template constexpr explicit RectangularMatrix(const RectangularMatrix& other) noexcept: RectangularMatrix{ZeroInit, typename Containers::Implementation::GenerateSequence::Type{}, other} {} /** @brief Construct a matrix from external representation */ - template::from(std::declval()))> constexpr explicit RectangularMatrix(const U& other): RectangularMatrix(Implementation::RectangularMatrixConverter::from(other)) {} + template::from(std::declval()))> constexpr explicit RectangularMatrix(const U& other): RectangularMatrix(Implementation::RectangularMatrixConverter::from(other)) {} /** @brief Convert a matrix to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::RectangularMatrixConverter::to(*this); } diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index 8fbf68205..8dc945992 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -250,10 +250,10 @@ template class Vector { constexpr explicit Vector(const BitVector& other) noexcept: Vector{typename Containers::Implementation::GenerateSequence::Type{}, other} {} /** @brief Construct a vector from external representation */ - template::from(std::declval()))> constexpr explicit Vector(const U& other) noexcept: Vector(Implementation::VectorConverter::from(other)) {} + template::from(std::declval()))> constexpr explicit Vector(const U& other) noexcept: Vector(Implementation::VectorConverter::from(other)) {} /** @brief Convert a vector to external representation */ - template::to(std::declval>()))> constexpr explicit operator U() const { + template::to(std::declval>()))> constexpr explicit operator U() const { return Implementation::VectorConverter::to(*this); } diff --git a/src/Magnum/Math/Vector2.h b/src/Magnum/Math/Vector2.h index 2bad26c23..84f04e20c 100644 --- a/src/Magnum/Math/Vector2.h +++ b/src/Magnum/Math/Vector2.h @@ -144,7 +144,7 @@ template class Vector2: public Vector<2, T> { constexpr explicit Vector2(const BitVector2& other) noexcept: Vector<2, T>{other} {} /** @brief Construct a vector from external representation */ - template::from(std::declval())) #else diff --git a/src/Magnum/Math/Vector3.h b/src/Magnum/Math/Vector3.h index ba5137354..2bbf7ff8b 100644 --- a/src/Magnum/Math/Vector3.h +++ b/src/Magnum/Math/Vector3.h @@ -172,7 +172,7 @@ template class Vector3: public Vector<3, T> { constexpr explicit Vector3(const BitVector3& other) noexcept: Vector<3, T>{other} {} /** @brief Construct a vector from external representation */ - template::from(std::declval())) #else diff --git a/src/Magnum/Math/Vector4.h b/src/Magnum/Math/Vector4.h index 5ed085345..1c1402908 100644 --- a/src/Magnum/Math/Vector4.h +++ b/src/Magnum/Math/Vector4.h @@ -118,7 +118,7 @@ template class Vector4: public Vector<4, T> { constexpr explicit Vector4(const BitVector4& other) noexcept: Vector<4, T>{other} {} /** @brief Construct a vector from external representation */ - template::from(std::declval()))> constexpr explicit Vector4(const U& other): Vector<4, T>(Implementation::VectorConverter<4, T, U>::from(other)) {} + template::from(std::declval()))> constexpr explicit Vector4(const U& other): Vector<4, T>(Implementation::VectorConverter<4, T, U>::from(other)) {} /** @brief Copy constructor */ constexpr /*implicit*/ Vector4(const Vector<4, T>& other) noexcept: Vector<4, T>(other) {}