forked from boostorg/utility
Remove constexpr from all but the comparison ops
This commit is contained in:
@@ -235,34 +235,34 @@ struct NAME##1 : B \
|
|||||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||||
struct NAME##2 : B \
|
struct NAME##2 : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \
|
friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
template <class T, class B = operators_detail::empty_base<T> > \
|
template <class T, class B = operators_detail::empty_base<T> > \
|
||||||
struct NAME##1 : B \
|
struct NAME##1 : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
|
friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \
|
#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \
|
||||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||||
struct NAME##2 : B \
|
struct NAME##2 : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||||
struct BOOST_OPERATOR2_LEFT(NAME) : B \
|
struct BOOST_OPERATOR2_LEFT(NAME) : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( const U& lhs, const T& rhs ) \
|
friend T operator OP( const U& lhs, const T& rhs ) \
|
||||||
{ return T( lhs ) OP##= rhs; } \
|
{ return T( lhs ) OP##= rhs; } \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
template <class T, class B = operators_detail::empty_base<T> > \
|
template <class T, class B = operators_detail::empty_base<T> > \
|
||||||
struct NAME##1 : B \
|
struct NAME##1 : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
|
friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
|
#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
|
||||||
@@ -354,13 +354,13 @@ struct NAME##1 : B \
|
|||||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||||
struct NAME##2 : B \
|
struct NAME##2 : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
template <class T, class B = operators_detail::empty_base<T> > \
|
template <class T, class B = operators_detail::empty_base<T> > \
|
||||||
struct NAME##1 : B \
|
struct NAME##1 : B \
|
||||||
{ \
|
{ \
|
||||||
friend BOOST_OPS_CONSTEXPR T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
|
friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
|
#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
|
||||||
|
Reference in New Issue
Block a user