Skip to content

Commit

Permalink
Use BOOST_MAY_ALIAS only for GCC 4.4, as other MSVC, GCC, and Clang d…
Browse files Browse the repository at this point in the history
…on't seem to need it.
  • Loading branch information
igaztanaga committed Sep 14, 2018
1 parent e25607d commit 5e2e0f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/boost/move/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
#define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast<RV_TYPE>(ARG)

//Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS
#if defined(BOOST_GCC) && (BOOST_GCC >= 40400) && (BOOST_GCC < 40500)
#define BOOST_RV_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS
#else
#define BOOST_RV_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS

This comment has been minimized.

Copy link
@jeking3

jeking3 Sep 19, 2018

Collaborator

You defined BOOST_RV_ATTRIBUTE_MAY_ALIAS to be the same value of BOOST_MAY_ALIAS on both compile-time branches?

This comment has been minimized.

Copy link
@igaztanaga

igaztanaga Sep 19, 2018

Author Member

Ughh! I need to retest all again locally to see if this ruins all my suppositions. Thanks for catching this!

This comment has been minimized.

Copy link
@jeking3

jeking3 Sep 19, 2018

Collaborator

I didn't see a pull request where a CI build and code review would happen. :)

#endif

namespace boost {

Expand All @@ -70,7 +74,7 @@
//
//////////////////////////////////////////////////////////////////////////////
template <class T>
class BOOST_MOVE_ATTRIBUTE_MAY_ALIAS rv
class BOOST_RV_ATTRIBUTE_MAY_ALIAS rv
: public ::boost::move_detail::if_c
< ::boost::move_detail::is_class<T>::value
, T
Expand Down

0 comments on commit 5e2e0f9

Please sign in to comment.