Browse Source

Math: remove unnecessary assignment operators.

Caused problems when specifying `noexcept` in classes with members from
Math namespace.
pull/165/merge
Vladimír Vondruš 10 years ago
parent
commit
737e92bc3e
  1. 3
      src/Magnum/Math/BoolVector.h
  2. 3
      src/Magnum/Math/RectangularMatrix.h
  3. 8
      src/Magnum/Math/Vector.h

3
src/Magnum/Math/BoolVector.h

@ -106,9 +106,6 @@ template<std::size_t size> class BoolVector {
/** @brief Copy constructor */ /** @brief Copy constructor */
constexpr BoolVector(const BoolVector<size>&) = default; constexpr BoolVector(const BoolVector<size>&) = default;
/** @brief Copy assignment */
BoolVector<size>& operator=(const BoolVector<size>&) = default;
/** /**
* @brief Raw data * @brief Raw data
* @return Array of DataSize length * @return Array of DataSize length

3
src/Magnum/Math/RectangularMatrix.h

@ -155,9 +155,6 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
/** @brief Copy constructor */ /** @brief Copy constructor */
constexpr RectangularMatrix(const RectangularMatrix<cols, rows, T>&) = default; constexpr RectangularMatrix(const RectangularMatrix<cols, rows, T>&) = default;
/** @brief Assignment operator */
RectangularMatrix<cols, rows, T>& operator=(const RectangularMatrix<cols, rows, T>&) = default;
/** @brief Convert matrix to external representation */ /** @brief Convert matrix to external representation */
template<class U, class V = decltype(Implementation::RectangularMatrixConverter<cols, rows, T, U>::to(std::declval<RectangularMatrix<cols, rows, T>>()))> constexpr explicit operator U() const { template<class U, class V = decltype(Implementation::RectangularMatrixConverter<cols, rows, T, U>::to(std::declval<RectangularMatrix<cols, rows, T>>()))> constexpr explicit operator U() const {
return Implementation::RectangularMatrixConverter<cols, rows, T, U>::to(*this); return Implementation::RectangularMatrixConverter<cols, rows, T, U>::to(*this);

8
src/Magnum/Math/Vector.h

@ -217,9 +217,6 @@ template<std::size_t size, class T> class Vector {
/** @brief Copy constructor */ /** @brief Copy constructor */
constexpr Vector(const Vector<size, T>&) = default; constexpr Vector(const Vector<size, T>&) = default;
/** @brief Assignment operator */
Vector<size, T>& operator=(const Vector<size, T>&) = default;
/** @brief Convert vector to external representation */ /** @brief Convert vector to external representation */
template<class U, class V = decltype(Implementation::VectorConverter<size, T, U>::to(std::declval<Vector<size, T>>()))> constexpr explicit operator U() const { template<class U, class V = decltype(Implementation::VectorConverter<size, T, U>::to(std::declval<Vector<size, T>>()))> constexpr explicit operator U() const {
return Implementation::VectorConverter<size, T, U>::to(*this); return Implementation::VectorConverter<size, T, U>::to(*this);
@ -1117,11 +1114,6 @@ extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utili
return Math::Vector<size, T>::pad(a, value); \ return Math::Vector<size, T>::pad(a, value); \
} \ } \
\ \
Type<T>& operator=(const Type<T>& other) { \
Math::Vector<size, T>::operator=(other); \
return *this; \
} \
\
Type<T> operator-() const { \ Type<T> operator-() const { \
return Math::Vector<size, T>::operator-(); \ return Math::Vector<size, T>::operator-(); \
} \ } \

Loading…
Cancel
Save