mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Remove constexpr from all but the comparison ops
This commit is contained in:
parent
e3a2a06011
commit
46f72656b3
@ -235,34 +235,34 @@ struct NAME##1 : B \
|
||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||
struct NAME##2 : B \
|
||||
{ \
|
||||
friend BOOST_OPS_CONSTEXPR 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( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
|
||||
friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \
|
||||
}; \
|
||||
\
|
||||
template <class T, class B = operators_detail::empty_base<T> > \
|
||||
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 ) \
|
||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||
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> > \
|
||||
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; } \
|
||||
}; \
|
||||
\
|
||||
template <class T, class B = operators_detail::empty_base<T> > \
|
||||
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)
|
||||
@ -354,13 +354,13 @@ struct NAME##1 : B \
|
||||
template <class T, class U, class B = operators_detail::empty_base<T> > \
|
||||
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> > \
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user