From 56acf9c325a90bd3188e193c920e2edf3a7c87ab Mon Sep 17 00:00:00 2001 From: Daniel Frey Date: Wed, 26 Feb 2003 21:26:57 +0000 Subject: [PATCH] Fixed shift-operators to respect BOOST_FORCE_SYMMETRIC_OPERATORS [SVN r17664] --- include/boost/operators.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/operators.hpp b/include/boost/operators.hpp index f2331c6..6acae62 100644 --- a/include/boost/operators.hpp +++ b/include/boost/operators.hpp @@ -305,7 +305,7 @@ struct indexable : B // More operator classes (contributed by Daryle Walker) --------------------// // (NRVO-friendly implementation contributed by Daniel Frey) ---------------// -#if defined(BOOST_HAS_NRVO) +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) #define BOOST_BINARY_OPERATOR( NAME, OP ) \ template \ @@ -322,7 +322,7 @@ struct NAME##1 : B \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; -#else // defined(BOOST_HAS_NRVO) +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) #define BOOST_BINARY_OPERATOR( NAME, OP ) \ template \ @@ -337,7 +337,7 @@ struct NAME##1 : B \ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ }; -#endif // defined(BOOST_HAS_NRVO) +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) BOOST_BINARY_OPERATOR( left_shiftable, << ) BOOST_BINARY_OPERATOR( right_shiftable, >> )