mirror of
https://github.com/boostorg/container.git
synced 2025-08-03 22:44:26 +02:00
Merge branch 'eldiener-develop' into develop
This commit is contained in:
@@ -1322,6 +1322,7 @@ use [*Boost.Container]? There are several reasons for that:
|
|||||||
* Fixed bugs:
|
* Fixed bugs:
|
||||||
* [@https://github.com/boostorg/container/issues/144 GitHub #144: ['"GCC suggest-override warnings"]].
|
* [@https://github.com/boostorg/container/issues/144 GitHub #144: ['"GCC suggest-override warnings"]].
|
||||||
* [@https://github.com/boostorg/container/issues/145 GitHub #145: ['"Allocations not handled correctly in some cases of vector move with unequal allocators"]].
|
* [@https://github.com/boostorg/container/issues/145 GitHub #145: ['"Allocations not handled correctly in some cases of vector move with unequal allocators"]].
|
||||||
|
* [@https://github.com/boostorg/container/pull/146 GitHub #146: ['"Changes for Embarcadero C++ clang-based compilers, targeting Boost 1.74. Addition needed for Embarcardero clang-based compilers"]].
|
||||||
* [@https://github.com/boostorg/container/pull/148 GitHub #148: ['"Fix static initialization issues in pmr global resources"]].
|
* [@https://github.com/boostorg/container/pull/148 GitHub #148: ['"Fix static initialization issues in pmr global resources"]].
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
@@ -52,6 +52,8 @@ class BOOST_CONTAINER_DECL memory_resource
|
|||||||
//! `return return do_is_equal(other);`
|
//! `return return do_is_equal(other);`
|
||||||
bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT
|
bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT
|
||||||
{ return this->do_is_equal(other); }
|
{ return this->do_is_equal(other); }
|
||||||
|
|
||||||
|
#if !defined(BOOST_EMBTC)
|
||||||
|
|
||||||
//! <b>Returns</b>:
|
//! <b>Returns</b>:
|
||||||
//! `&a == &b || a.is_equal(b)`.
|
//! `&a == &b || a.is_equal(b)`.
|
||||||
@@ -62,6 +64,18 @@ class BOOST_CONTAINER_DECL memory_resource
|
|||||||
//! !(a == b).
|
//! !(a == b).
|
||||||
friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
|
friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
|
||||||
{ return !(a == b); }
|
{ return !(a == b); }
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
//! <b>Returns</b>:
|
||||||
|
//! `&a == &b || a.is_equal(b)`.
|
||||||
|
friend bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT;
|
||||||
|
|
||||||
|
//! <b>Returns</b>:
|
||||||
|
//! !(a == b).
|
||||||
|
friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! <b>Requires</b>: Alignment shall be a power of two.
|
//! <b>Requires</b>: Alignment shall be a power of two.
|
||||||
@@ -93,6 +107,20 @@ class BOOST_CONTAINER_DECL memory_resource
|
|||||||
virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT = 0;
|
virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_EMBTC)
|
||||||
|
|
||||||
|
//! <b>Returns</b>:
|
||||||
|
//! `&a == &b || a.is_equal(b)`.
|
||||||
|
inline bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
|
||||||
|
{ return &a == &b || a.is_equal(b); }
|
||||||
|
|
||||||
|
//! <b>Returns</b>:
|
||||||
|
//! !(a == b).
|
||||||
|
inline bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT
|
||||||
|
{ return !(a == b); }
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
} //namespace pmr {
|
} //namespace pmr {
|
||||||
} //namespace container {
|
} //namespace container {
|
||||||
} //namespace boost {
|
} //namespace boost {
|
||||||
|
@@ -1515,7 +1515,7 @@ LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
|
|||||||
#pragma intrinsic (_InterlockedExchange)
|
#pragma intrinsic (_InterlockedExchange)
|
||||||
#define interlockedcompareexchange _InterlockedCompareExchange
|
#define interlockedcompareexchange _InterlockedCompareExchange
|
||||||
#define interlockedexchange _InterlockedExchange
|
#define interlockedexchange _InterlockedExchange
|
||||||
#elif defined(WIN32) && defined(__GNUC__)
|
#elif defined(WIN32) && (defined(__GNUC__) || defined(__clang__))
|
||||||
#define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b)
|
#define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b)
|
||||||
#define interlockedexchange __sync_lock_test_and_set
|
#define interlockedexchange __sync_lock_test_and_set
|
||||||
#endif /* Win32 */
|
#endif /* Win32 */
|
||||||
|
Reference in New Issue
Block a user