Browse Source

singles: don't include StrictWeakOrdering in MagnumMath.hpp.

pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
fa079385bf
  1. 2
      src/Magnum/Math/Bezier.h
  2. 2
      src/Magnum/Math/BitVector.h
  3. 3
      src/Magnum/Math/Color.h
  4. 2
      src/Magnum/Math/Complex.h
  5. 2
      src/Magnum/Math/CubicHermite.h
  6. 2
      src/Magnum/Math/Dual.h
  7. 2
      src/Magnum/Math/DualComplex.h
  8. 2
      src/Magnum/Math/DualQuaternion.h
  9. 2
      src/Magnum/Math/Frustum.h
  10. 2
      src/Magnum/Math/Half.h
  11. 2
      src/Magnum/Math/Math.h
  12. 2
      src/Magnum/Math/Matrix.h
  13. 2
      src/Magnum/Math/Matrix3.h
  14. 2
      src/Magnum/Math/Matrix4.h
  15. 2
      src/Magnum/Math/Quaternion.h
  16. 2
      src/Magnum/Math/Range.h
  17. 2
      src/Magnum/Math/RectangularMatrix.h
  18. 2
      src/Magnum/Math/Vector.h
  19. 3
      src/Magnum/Math/Vector2.h
  20. 2
      src/Magnum/Math/Vector3.h
  21. 2
      src/Magnum/Math/Vector4.h
  22. 5
      src/singles/MagnumMath.hpp

2
src/Magnum/Math/Bezier.h

@ -324,6 +324,7 @@ extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utili
#endif
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<UnsignedInt order, UnsignedInt dimensions, class T> struct StrictWeakOrdering<Bezier<order, dimensions, T>> {
@ -341,6 +342,7 @@ template<UnsignedInt order, UnsignedInt dimensions, class T> struct StrictWeakOr
};
}
#endif
}}

2
src/Magnum/Math/BitVector.h

@ -417,6 +417,7 @@ template<std::size_t size> inline BitVector<size> BitVector<size>::operator~() c
return out;
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<std::size_t size> struct StrictWeakOrdering<BitVector<size>> {
@ -438,6 +439,7 @@ template<std::size_t size> struct StrictWeakOrdering<BitVector<size>> {
};
}
#endif
}}

3
src/Magnum/Math/Color.h

@ -1599,9 +1599,10 @@ namespace Implementation {
template<class T> struct TypeForSize<3, Color4<T>> { typedef Color3<T> Type; };
template<class T> struct TypeForSize<4, Color3<T>> { typedef Color4<T> Type; };
template<class T> struct TypeForSize<4, Color4<T>> { typedef Color4<T> Type; };
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
template<class T> struct StrictWeakOrdering<Color3<T>>: StrictWeakOrdering<Vector<3, T>> {};
template<class T> struct StrictWeakOrdering<Color4<T>>: StrictWeakOrdering<Vector<4, T>> {};
#endif
}
}}

2
src/Magnum/Math/Complex.h

@ -672,6 +672,7 @@ extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utili
#endif
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<Complex<T>> {
@ -686,6 +687,7 @@ template<class T> struct StrictWeakOrdering<Complex<T>> {
};
}
#endif
}}

2
src/Magnum/Math/CubicHermite.h

@ -558,6 +558,7 @@ template<class T> inline bool CubicHermite<T>::operator==(const CubicHermite<T>&
TypeTraits<T>::equals(_outTangent, other._outTangent);
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<CubicHermite<T>> {
@ -576,6 +577,7 @@ template<class T> struct StrictWeakOrdering<CubicHermite<T>> {
};
}
#endif
}}

2
src/Magnum/Math/Dual.h

@ -422,6 +422,7 @@ template<class T> std::pair<Dual<T>, Dual<T>> sincos(const Dual<Unit<Rad, T>>& a
template<class T> std::pair<Dual<T>, Dual<T>> sincos(const Dual<Unit<Deg, T>>& angle) { return sincos(Dual<Rad<T>>(angle)); }
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<Dual<T>> {
@ -437,6 +438,7 @@ template<class T> struct StrictWeakOrdering<Dual<T>> {
};
}
#endif
}}

2
src/Magnum/Math/DualComplex.h

@ -421,9 +421,11 @@ extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utili
#endif
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<DualComplex<T>>: StrictWeakOrdering<Dual<Complex<T>>> {};
}
#endif
}}

2
src/Magnum/Math/DualQuaternion.h

@ -589,9 +589,11 @@ extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utili
#endif
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<DualQuaternion<T>>: StrictWeakOrdering<Dual<Quaternion<T>>> {};
}
#endif
}}

2
src/Magnum/Math/Frustum.h

@ -311,6 +311,7 @@ template<class T> template<class U> constexpr Frustum<T>::Frustum(const Frustum<
Vector4<T>{other[4]},
Vector4<T>{other[5]}} {}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<Frustum<T>> {
@ -328,6 +329,7 @@ template<class T> struct StrictWeakOrdering<Frustum<T>> {
};
}
#endif
}}

2
src/Magnum/Math/Half.h

@ -188,6 +188,7 @@ Prints the value with 4 significant digits.
MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, Half value);
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<> struct StrictWeakOrdering<Half> {
@ -198,6 +199,7 @@ template<> struct StrictWeakOrdering<Half> {
};
}
#endif
}}

2
src/Magnum/Math/Math.h

@ -109,10 +109,12 @@ template<class T> using Range1D = Range<1, T>;
template<class> class Range2D;
template<class> class Range3D;
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class> struct StrictWeakOrdering;
}
#endif
#endif
}}

2
src/Magnum/Math/Matrix.h

@ -447,7 +447,9 @@ template<class T> struct MatrixDeterminant<1, T> {
}
};
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
template<std::size_t size, class T> struct StrictWeakOrdering<Matrix<size, T>>: StrictWeakOrdering<RectangularMatrix<size, size, T>> {};
#endif
}
#endif

2
src/Magnum/Math/Matrix3.h

@ -792,9 +792,11 @@ template<class T> inline Matrix3<T> Matrix3<T>::invertedRigid() const {
return from(inverseRotation, inverseRotation*-translation());
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<Matrix3<T>>: StrictWeakOrdering<RectangularMatrix<3, 3, T>> {};
}
#endif
}}

2
src/Magnum/Math/Matrix4.h

@ -1357,9 +1357,11 @@ template<class T> Matrix4<T> Matrix4<T>::invertedRigid() const {
return from(inverseRotation, inverseRotation*-translation());
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<Matrix4<T>>: StrictWeakOrdering<RectangularMatrix<4, 4, T>> {};
}
#endif
}}

2
src/Magnum/Math/Quaternion.h

@ -945,6 +945,7 @@ template<class T> inline Vector3<T> Quaternion<T>::transformVectorNormalized(con
return vector + _scalar*t + Math::cross(_vector, t);
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct StrictWeakOrdering<Quaternion<T>> {
@ -960,6 +961,7 @@ template<class T> struct StrictWeakOrdering<Quaternion<T>> {
};
}
#endif
}}

2
src/Magnum/Math/Range.h

@ -824,6 +824,7 @@ template<UnsignedInt dimensions, class T> inline bool Range<dimensions, T>::oper
TypeTraits<VectorType>::equals(_max, other._max);
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<UnsignedInt dimensions, class T> struct StrictWeakOrdering<Range<dimensions, T>> {
@ -838,6 +839,7 @@ template<UnsignedInt dimensions, class T> struct StrictWeakOrdering<Range<dimens
};
}
#endif
}}

2
src/Magnum/Math/RectangularMatrix.h

@ -873,6 +873,7 @@ template<std::size_t cols, std::size_t rows, class T> template<std::size_t ...se
}
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<std::size_t cols, std::size_t rows, class T> struct StrictWeakOrdering<RectangularMatrix<cols, rows, T>> {
@ -890,6 +891,7 @@ template<std::size_t cols, std::size_t rows, class T> struct StrictWeakOrdering<
};
}
#endif
}}

2
src/Magnum/Math/Vector.h

@ -1585,6 +1585,7 @@ template<std::size_t size, class T> inline std::pair<T, T> Vector<size, T>::minm
return {min, max};
}
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<std::size_t size, class T> struct StrictWeakOrdering<Vector<size, T>> {
@ -1601,6 +1602,7 @@ template<std::size_t size, class T> struct StrictWeakOrdering<Vector<size, T>> {
};
}
#endif
}}

3
src/Magnum/Math/Vector2.h

@ -238,8 +238,9 @@ MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(2, Vector2)
namespace Implementation {
template<std::size_t, class> struct TypeForSize;
template<class T> struct TypeForSize<2, T> { typedef Math::Vector2<typename T::Type> Type; };
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
template<class T> struct StrictWeakOrdering<Vector2<T>>: StrictWeakOrdering<Vector<2, T>> {};
#endif
}
}}

2
src/Magnum/Math/Vector3.h

@ -262,11 +262,13 @@ template<class T> class Vector3: public Vector<3, T> {
MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(3, Vector3)
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct TypeForSize<3, T> { typedef Math::Vector3<typename T::Type> Type; };
template<class T> struct StrictWeakOrdering<Vector3<T>>: StrictWeakOrdering<Vector<3, T>> {};
}
#endif
}}

2
src/Magnum/Math/Vector4.h

@ -284,11 +284,13 @@ template<class T> Vector4<T> planeEquation(const Vector3<T>& normal, const Vecto
MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(4, Vector4)
#endif
#ifndef MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
namespace Implementation {
template<class T> struct TypeForSize<4, T> { typedef Math::Vector4<typename T::Type> Type; };
template<class T> struct StrictWeakOrdering<Vector4<T>>: StrictWeakOrdering<Vector<4, T>> {};
}
#endif
}}

5
src/singles/MagnumMath.hpp

@ -95,6 +95,10 @@
#pragma ACME enable CORRADE_INTERNAL_CONSTEXPR_ASSERT
#pragma ACME enable CORRADE_INTERNAL_CONSTEXPR_DEBUG_ASSERT
/* Disable strict weak ordering helpers as they're non-essential. The
StrictWeakOrdering.h header isn't included either. */
#pragma ACME enable MAGNUM_NO_MATH_STRICT_WEAK_ORDERING
/* We don't need everything from configure.h here */
#pragma ACME enable Corrade_configure_h
#pragma ACME enable Magnum_configure_h
@ -379,7 +383,6 @@ typedef Math::Frustum<Double> Frustumd;
#include "Magnum/Math/Quaternion.h"
#include "Magnum/Math/Range.h"
#include "Magnum/Math/RectangularMatrix.h"
#include "Magnum/Math/StrictWeakOrdering.h"
#include "Magnum/Math/Swizzle.h"
#include "Magnum/Math/Tags.h"
#include "Magnum/Math/TypeTraits.h"

Loading…
Cancel
Save