Browse Source

Math: better qualification of types in Dual subclass implementation macro.

pull/114/merge
Vladimír Vondruš 11 years ago
parent
commit
2c34110aa9
  1. 26
      src/Magnum/Math/Dual.h

26
src/Magnum/Math/Dual.h

@ -186,27 +186,27 @@ template<class T> class Dual {
#ifndef DOXYGEN_GENERATING_OUTPUT
#define MAGNUM_DUAL_SUBCLASS_IMPLEMENTATION(Type, Underlying) \
Type<T> operator-() const { \
return Dual<Underlying<T>>::operator-(); \
return Math::Dual<Underlying<T>>::operator-(); \
} \
Type<T>& operator+=(const Dual<Underlying<T>>& other) { \
Dual<Underlying<T>>::operator+=(other); \
Type<T>& operator+=(const Math::Dual<Underlying<T>>& other) { \
Math::Dual<Underlying<T>>::operator+=(other); \
return *this; \
} \
Type<T> operator+(const Dual<Underlying<T>>& other) const { \
return Dual<Underlying<T>>::operator+(other); \
Type<T> operator+(const Math::Dual<Underlying<T>>& other) const { \
return Math::Dual<Underlying<T>>::operator+(other); \
} \
Type<T>& operator-=(const Dual<Underlying<T>>& other) { \
Dual<Underlying<T>>::operator-=(other); \
Type<T>& operator-=(const Math::Dual<Underlying<T>>& other) { \
Math::Dual<Underlying<T>>::operator-=(other); \
return *this; \
} \
Type<T> operator-(const Dual<Underlying<T>>& other) const { \
return Dual<Underlying<T>>::operator-(other); \
Type<T> operator-(const Math::Dual<Underlying<T>>& other) const { \
return Math::Dual<Underlying<T>>::operator-(other); \
} \
template<class U> Type<T> operator*(const Dual<U>& other) const { \
return Dual<Underlying<T>>::operator*(other); \
template<class U> Type<T> operator*(const Math::Dual<U>& other) const { \
return Math::Dual<Underlying<T>>::operator*(other); \
} \
template<class U> Type<T> operator/(const Dual<U>& other) const { \
return Dual<Underlying<T>>::operator/(other); \
template<class U> Type<T> operator/(const Math::Dual<U>& other) const { \
return Math::Dual<Underlying<T>>::operator/(other); \
}
#endif

Loading…
Cancel
Save