Fixed Trac #9785: Compiler warning with intel icc in boost/move/core.hpp

This commit is contained in:
Ion Gaztañaga
2014-08-01 17:29:59 +02:00
parent 51c9e874a8
commit 388b71d333
2 changed files with 12 additions and 2 deletions

View File

@@ -638,7 +638,7 @@ will get the non-const copy constructor overload, which will surely surprise use
} }
This limitation forces the user to define a const version of the copy assignment, This limitation forces the user to define a const version of the copy assignment,
in all classes holding copyable and movable classes which might annoying in some cases. in all classes holding copyable and movable classes which might be annoying in some cases.
An alternative is to implement a single `operator =()` for copyable and movable classes An alternative is to implement a single `operator =()` for copyable and movable classes
[@http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ using "pass by value" semantics]: [@http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ using "pass by value" semantics]:
@@ -755,6 +755,12 @@ Many thanks to all boosters that have tested, reviewed and improved the library.
[section:release_notes Release Notes] [section:release_notes Release Notes]
[section:release_notes_boost_1_57_00 Boost 1.57 Release]
* Fixed bug [@https://svn.boost.org/trac/boost/ticket/9785 Trac #9785: ['"Compiler warning with intel icc in boost/move/core.hpp"]],
[endsect]
[section:release_notes_boost_1_56_00 Boost 1.56 Release] [section:release_notes_boost_1_56_00 Boost 1.56 Release]
* Added [macroref BOOST_MOVE_RET BOOST_MOVE_RET]. * Added [macroref BOOST_MOVE_RET BOOST_MOVE_RET].

View File

@@ -45,7 +45,11 @@
#include <boost/move/detail/meta_utils.hpp> #include <boost/move/detail/meta_utils.hpp>
//Move emulation rv breaks standard aliasing rules so add workarounds for some compilers //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
#if defined(__GNUC__) && (__GNUC__ >= 4) #if defined(__GNUC__) && (__GNUC__ >= 4) && \
(\
defined(BOOST_GCC) || \
(defined(BOOST_INTEL) && (BOOST_INTEL_CXX_VERSION >= 1300)) \
)
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__))
#else #else
#define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS