mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 05:54:28 +02:00
Disable strict aliasing for C++03 implementations as type-punning is used to make value_type movable.
This commit is contained in:
@@ -52,6 +52,12 @@
|
|||||||
#define BOOST_CONTAINER_STD_PAIR_IS_MOVABLE
|
#define BOOST_CONTAINER_STD_PAIR_IS_MOVABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//for C++03 compilers, were type-puning is the only option for std::pair
|
||||||
|
//disable strict aliasing to reduce problems.
|
||||||
|
#if defined(BOOST_GCC) && (BOOST_GCC >= 100000) && !defined(BOOST_CONTAINER_STD_PAIR_IS_MOVABLE)
|
||||||
|
#pragma GCC push_options
|
||||||
|
#pragma GCC optimize("no-strict-aliasing")
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace container {
|
namespace container {
|
||||||
@@ -3014,6 +3020,10 @@ class flat_multimap
|
|||||||
{ x.swap(y); }
|
{ x.swap(y); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_GCC) && (BOOST_GCC >= 100000) && !defined(BOOST_CONTAINER_STD_PAIR_IS_MOVABLE)
|
||||||
|
#pragma GCC pop_options
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
|
#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
|
||||||
|
|
||||||
template <typename InputIterator>
|
template <typename InputIterator>
|
||||||
|
Reference in New Issue
Block a user