aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2023-04-30 17:22:46 +0300
committerthegeorg <thegeorg@yandex-team.com>2023-04-30 17:22:46 +0300
commitaafa1d52a0218b80ccff2120e4b52a8cdef58643 (patch)
tree86549ed61c69e8276cdecccb0c5933316381afe5
parent0f76e6d63e6c15b24f4127cd3e3196e67c79ff09 (diff)
downloadydb-aafa1d52a0218b80ccff2120e4b52a8cdef58643.tar.gz
Update contrib/restricted/boost/container to 1.82.0
-rw-r--r--contrib/restricted/boost/container/CMakeLists.darwin-x86_64.txt3
-rw-r--r--contrib/restricted/boost/container/CMakeLists.linux-aarch64.txt3
-rw-r--r--contrib/restricted/boost/container/CMakeLists.linux-x86_64.txt3
-rw-r--r--contrib/restricted/boost/container/CMakeLists.windows-x86_64.txt3
-rw-r--r--contrib/restricted/boost/container/include/boost/container/container_fwd.hpp29
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/advanced_insert_int.hpp17
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/allocator_version_traits.hpp29
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/config_begin.hpp1
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/copy_move_algo.hpp85
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/dispatch_uses_allocator.hpp66
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/node_alloc_holder.hpp26
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/placement_new.hpp8
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/tree.hpp13
-rw-r--r--contrib/restricted/boost/container/include/boost/container/detail/workaround.hpp33
-rw-r--r--contrib/restricted/boost/container/include/boost/container/node_handle.hpp20
-rw-r--r--contrib/restricted/boost/container/include/boost/container/pmr/memory_resource.hpp2
-rw-r--r--contrib/restricted/boost/container/include/boost/container/scoped_allocator.hpp2
-rw-r--r--contrib/restricted/boost/container/include/boost/container/small_vector.hpp51
-rw-r--r--contrib/restricted/boost/container/include/boost/container/throw_exception.hpp9
-rw-r--r--contrib/restricted/boost/container/include/boost/container/vector.hpp138
-rw-r--r--contrib/restricted/boost/container/src/global_resource.cpp3
-rw-r--r--contrib/restricted/boost/container/src/pool_resource.cpp1
22 files changed, 301 insertions, 244 deletions
diff --git a/contrib/restricted/boost/container/CMakeLists.darwin-x86_64.txt b/contrib/restricted/boost/container/CMakeLists.darwin-x86_64.txt
index 74ef11ce7c..43c88cbe69 100644
--- a/contrib/restricted/boost/container/CMakeLists.darwin-x86_64.txt
+++ b/contrib/restricted/boost/container/CMakeLists.darwin-x86_64.txt
@@ -18,12 +18,9 @@ target_link_libraries(restricted-boost-container PUBLIC
contrib-libs-cxxsupp
restricted-boost-assert
restricted-boost-config
- restricted-boost-core
restricted-boost-intrusive
restricted-boost-move
restricted-boost-static_assert
- restricted-boost-type_traits
- restricted-boost-winapi
)
target_sources(restricted-boost-container PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/boost/container/src/alloc_lib.c
diff --git a/contrib/restricted/boost/container/CMakeLists.linux-aarch64.txt b/contrib/restricted/boost/container/CMakeLists.linux-aarch64.txt
index 8478a2b475..ad178b95b4 100644
--- a/contrib/restricted/boost/container/CMakeLists.linux-aarch64.txt
+++ b/contrib/restricted/boost/container/CMakeLists.linux-aarch64.txt
@@ -19,12 +19,9 @@ target_link_libraries(restricted-boost-container PUBLIC
contrib-libs-cxxsupp
restricted-boost-assert
restricted-boost-config
- restricted-boost-core
restricted-boost-intrusive
restricted-boost-move
restricted-boost-static_assert
- restricted-boost-type_traits
- restricted-boost-winapi
)
target_sources(restricted-boost-container PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/boost/container/src/alloc_lib.c
diff --git a/contrib/restricted/boost/container/CMakeLists.linux-x86_64.txt b/contrib/restricted/boost/container/CMakeLists.linux-x86_64.txt
index 8478a2b475..ad178b95b4 100644
--- a/contrib/restricted/boost/container/CMakeLists.linux-x86_64.txt
+++ b/contrib/restricted/boost/container/CMakeLists.linux-x86_64.txt
@@ -19,12 +19,9 @@ target_link_libraries(restricted-boost-container PUBLIC
contrib-libs-cxxsupp
restricted-boost-assert
restricted-boost-config
- restricted-boost-core
restricted-boost-intrusive
restricted-boost-move
restricted-boost-static_assert
- restricted-boost-type_traits
- restricted-boost-winapi
)
target_sources(restricted-boost-container PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/boost/container/src/alloc_lib.c
diff --git a/contrib/restricted/boost/container/CMakeLists.windows-x86_64.txt b/contrib/restricted/boost/container/CMakeLists.windows-x86_64.txt
index 74ef11ce7c..43c88cbe69 100644
--- a/contrib/restricted/boost/container/CMakeLists.windows-x86_64.txt
+++ b/contrib/restricted/boost/container/CMakeLists.windows-x86_64.txt
@@ -18,12 +18,9 @@ target_link_libraries(restricted-boost-container PUBLIC
contrib-libs-cxxsupp
restricted-boost-assert
restricted-boost-config
- restricted-boost-core
restricted-boost-intrusive
restricted-boost-move
restricted-boost-static_assert
- restricted-boost-type_traits
- restricted-boost-winapi
)
target_sources(restricted-boost-container PRIVATE
${CMAKE_SOURCE_DIR}/contrib/restricted/boost/container/src/alloc_lib.c
diff --git a/contrib/restricted/boost/container/include/boost/container/container_fwd.hpp b/contrib/restricted/boost/container/include/boost/container/container_fwd.hpp
index df0fc1208a..9e82fdef66 100644
--- a/contrib/restricted/boost/container/include/boost/container/container_fwd.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/container_fwd.hpp
@@ -186,35 +186,6 @@ template <class Key
,class Allocator = void >
class flat_multimap;
-//Experimental forward declarations, not implemented yet!
-template <class Key
- ,class Hash //= hash<Key>,
- ,class Pred = std::equal_to<Key>
- ,class Compare = std::less<Key>
- ,class Allocator = void
- ,class Options = void>
-class hash_set;
-
-template <class Key
- ,class Compare = std::less<Key>
- ,class Allocator = void
- ,class Options = void >
-class hash_multiset;
-
-template <class Key
- ,class T
- ,class Compare = std::less<Key>
- ,class Allocator = void
- ,class Options = void >
-class hash_map;
-
-template <class Key
- ,class T
- ,class Compare = std::less<Key>
- ,class Allocator = void
- ,class Options = void >
-class hash_multimap;
-
#ifndef BOOST_NO_CXX11_TEMPLATE_ALIASES
//! Alias templates for small_flat_[multi]{set|map} using small_vector as container
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/advanced_insert_int.hpp b/contrib/restricted/boost/container/include/boost/container/detail/advanced_insert_int.hpp
index 39df13f812..0238805db2 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/advanced_insert_int.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/advanced_insert_int.hpp
@@ -41,7 +41,6 @@
#include <boost/move/detail/force_ptr.hpp>
// other
#include <boost/assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
namespace boost { namespace container { namespace dtl {
@@ -315,14 +314,14 @@ struct insert_emplace_proxy
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
alloc_traits::construct(a, move_detail::force_ptr<value_type *>(&v), ::boost::forward<Args>(get<IdxPack>(this->args_))...);
value_type *vp = move_detail::force_ptr<value_type *>(&v);
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
*p = ::boost::move(*vp);
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
alloc_traits::destroy(a, vp);
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
alloc_traits::destroy(a, vp);
}
};
@@ -438,14 +437,14 @@ struct insert_emplace_proxy_arg##N\
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
alloc_traits::construct(a, move_detail::force_ptr<value_type *>(&v) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
value_type *vp = move_detail::force_ptr<value_type *>(&v);\
- BOOST_TRY{\
+ BOOST_CONTAINER_TRY{\
*p = ::boost::move(*vp);\
}\
- BOOST_CATCH(...){\
+ BOOST_CONTAINER_CATCH(...){\
alloc_traits::destroy(a, vp);\
- BOOST_RETHROW\
+ BOOST_CONTAINER_RETHROW\
}\
- BOOST_CATCH_END\
+ BOOST_CONTAINER_CATCH_END\
alloc_traits::destroy(a, vp);\
}\
};\
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/allocator_version_traits.hpp b/contrib/restricted/boost/container/include/boost/container/detail/allocator_version_traits.hpp
index d037e0e392..391f4666cc 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/allocator_version_traits.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/allocator_version_traits.hpp
@@ -29,7 +29,6 @@
#include <boost/container/detail/allocation_type.hpp> //allocation_type
#include <boost/container/detail/mpl.hpp> //integral_constant
#include <boost/intrusive/pointer_traits.hpp> //pointer_traits
-#include <boost/core/no_exceptions_support.hpp> //BOOST_TRY
namespace boost {
namespace container {
@@ -47,19 +46,19 @@ struct allocator_version_traits
typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
//Node allocation interface
- static pointer allocate_one(Allocator &a)
+ BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a)
{ return a.allocate_one(); }
- static void deallocate_one(Allocator &a, const pointer &p)
+ BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p)
{ a.deallocate_one(p); }
- static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
+ BOOST_CONTAINER_FORCEINLINE static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
{ return a.allocate_individual(n, m); }
- static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
+ BOOST_CONTAINER_FORCEINLINE static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
{ a.deallocate_individual(holder); }
- static pointer allocation_command(Allocator &a, allocation_type command,
+ BOOST_CONTAINER_FORCEINLINE static pointer allocation_command(Allocator &a, allocation_type command,
size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
{ return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); }
};
@@ -83,10 +82,10 @@ struct allocator_version_traits<Allocator, 1>
< multialloc_cached_counted, value_type> multiallocation_chain;
//Node allocation interface
- static pointer allocate_one(Allocator &a)
+ BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a)
{ return a.allocate(1); }
- static void deallocate_one(Allocator &a, const pointer &p)
+ BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p)
{ a.deallocate(p, 1); }
static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
@@ -103,17 +102,17 @@ struct allocator_version_traits<Allocator, 1>
struct allocate_individual_rollback
{
- allocate_individual_rollback(Allocator &a, multiallocation_chain &chain)
+ BOOST_CONTAINER_FORCEINLINE allocate_individual_rollback(Allocator &a, multiallocation_chain &chain)
: mr_a(a), mp_chain(&chain)
{}
- ~allocate_individual_rollback()
+ BOOST_CONTAINER_FORCEINLINE ~allocate_individual_rollback()
{
if(mp_chain)
allocator_version_traits::deallocate_individual(mr_a, *mp_chain);
}
- void release()
+ BOOST_CONTAINER_FORCEINLINE void release()
{
mp_chain = 0;
}
@@ -139,15 +138,15 @@ struct allocator_version_traits<Allocator, 1>
throw_logic_error("version 1 allocator without allocate_new flag");
}
else{
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
ret = a.allocate(prefer_in_recvd_out_size);
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
if(!(command & nothrow_allocation)){
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
reuse = pointer();
}
return ret;
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/config_begin.hpp b/contrib/restricted/boost/container/include/boost/container/detail/config_begin.hpp
index 17d9e80e48..e1075d1d5b 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/config_begin.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/config_begin.hpp
@@ -17,6 +17,7 @@
#ifdef BOOST_MSVC
#pragma warning (push)
+ #pragma warning (disable : 4619) // there is no warning number 'XXXX'
#pragma warning (disable : 4127) // conditional expression is constant
#pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned
#pragma warning (disable : 4197) // top-level volatile in cast is ignored
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/copy_move_algo.hpp b/contrib/restricted/boost/container/include/boost/container/detail/copy_move_algo.hpp
index 47660aa756..8729b307bb 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/copy_move_algo.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/copy_move_algo.hpp
@@ -34,7 +34,7 @@
#include <boost/move/utility_core.hpp>
#include <boost/move/traits.hpp>
// other
-#include <boost/core/no_exceptions_support.hpp>
+#include <boost/assert.hpp>
// std
#include <cstring> //for memmove/memcpy
@@ -296,9 +296,6 @@ struct is_memzero_initializable
#if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO)
|| dtl::is_floating_point<value_type>::value
#endif
- #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) && defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
- || dtl::is_pod<value_type>::value
- #endif
);
};
@@ -350,19 +347,19 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
uninitialized_move_alloc(Allocator &a, I f, I l, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (f != l) {
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
++f; ++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
@@ -395,20 +392,20 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
uninitialized_move_alloc_n(Allocator &a, I f, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
--n;
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
++f; ++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
@@ -441,20 +438,20 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
uninitialized_move_alloc_n_source(Allocator &a, I f, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
--n;
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
++f; ++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return f;
}
@@ -487,19 +484,19 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
uninitialized_copy_alloc(Allocator &a, I f, I l, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (f != l) {
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
++f; ++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
@@ -532,20 +529,20 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
uninitialized_copy_alloc_n(Allocator &a, I f, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
--n;
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
++f; ++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
@@ -578,19 +575,19 @@ inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
uninitialized_copy_alloc_n_source(Allocator &a, I f, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f);
++f; ++r; --n;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return f;
}
@@ -622,20 +619,20 @@ inline typename dtl::disable_if_memzero_initializable<F, F>::type
uninitialized_value_init_alloc_n(Allocator &a, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
--n;
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r));
++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
@@ -674,20 +671,20 @@ template
inline F uninitialized_default_init_alloc_n(Allocator &a, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
--n;
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), default_init);
++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
@@ -711,19 +708,19 @@ template
inline void uninitialized_fill_alloc(Allocator &a, F f, F l, const T &t)
{
F back = f;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (f != l) {
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(f), t);
++f;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != l; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
@@ -747,20 +744,20 @@ template
inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, std::size_t n, F r)
{
F back = r;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
while (n) {
--n;
allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), v);
++r;
}
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
for (; back != r; ++back){
allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
}
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return r;
}
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/dispatch_uses_allocator.hpp b/contrib/restricted/boost/container/include/boost/container/detail/dispatch_uses_allocator.hpp
index 800b1b3aa8..42fd4f4fd7 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/dispatch_uses_allocator.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/dispatch_uses_allocator.hpp
@@ -33,8 +33,6 @@
#endif
#include <boost/move/utility_core.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-
namespace boost { namespace container {
namespace dtl {
@@ -228,14 +226,14 @@ BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> BOOST_MO
, Pair* p)
{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->first));
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->second));
}
- BOOST_CATCH(...) {
+ BOOST_CONTAINER_CATCH(...) {
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
@@ -249,14 +247,14 @@ BOOST_CONTAINER_DOC1ST(void, typename dtl::enable_if<dtl::is_pair<Pair> BOOST_MO
, Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y)
{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<U>(x));
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<V>(y));
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
template < typename ConstructAlloc
@@ -296,15 +294,15 @@ typename dtl::enable_if< dtl::is_pair<Pair> BOOST_MOVE_I void>::type\
(void)p; (void)q;\
dispatch_uses_allocator\
(construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\
- BOOST_TRY{\
+ BOOST_CONTAINER_TRY{\
dispatch_uses_allocator\
(construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\
}\
- BOOST_CATCH(...) {\
+ BOOST_CONTAINER_CATCH(...) {\
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
- BOOST_RETHROW\
+ BOOST_CONTAINER_RETHROW\
}\
- BOOST_CATCH_END\
+ BOOST_CONTAINER_CATCH_END\
}\
//
BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE)
@@ -320,14 +318,14 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO
{
(void)t1; (void)t2;
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(pair->first), ::boost::forward<Args1>(get<Indexes1>(t1))...);
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(pair->second), ::boost::forward<Args2>(get<Indexes2>(t2))...);
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
template< typename ConstructAlloc, typename ArgAlloc, class Pair
@@ -356,15 +354,15 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO
(void)p; (void)q;\
dispatch_uses_allocator\
(construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
- BOOST_TRY{\
+ BOOST_CONTAINER_TRY{\
dispatch_uses_allocator\
(construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
}\
- BOOST_CATCH(...) {\
+ BOOST_CONTAINER_CATCH(...) {\
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
- BOOST_RETHROW\
+ BOOST_CONTAINER_RETHROW\
}\
- BOOST_CATCH_END\
+ BOOST_CONTAINER_CATCH_END\
}\
//
BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE)
@@ -391,15 +389,15 @@ BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BO
(void)p; (void)q;\
dispatch_uses_allocator\
(construct_alloc, arg_alloc, dtl::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\
- BOOST_TRY{\
+ BOOST_CONTAINER_TRY{\
dispatch_uses_allocator\
(construct_alloc, arg_alloc, dtl::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\
}\
- BOOST_CATCH(...) {\
+ BOOST_CONTAINER_CATCH(...) {\
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(pair->first));\
- BOOST_RETHROW\
+ BOOST_CONTAINER_RETHROW\
}\
- BOOST_CATCH_END\
+ BOOST_CONTAINER_CATCH_END\
}\
//
BOOST_MOVE_ITER2D_0TOMAX(BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE)
@@ -418,14 +416,14 @@ typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
(ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args)
{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->second), ::boost::forward<Args>(args)...);
}
- BOOST_CATCH(...) {
+ BOOST_CONTAINER_CATCH(...) {
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
#else
@@ -439,14 +437,14 @@ typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{\
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->first), ::boost::forward<KeyType>(k));\
- BOOST_TRY{\
+ BOOST_CONTAINER_TRY{\
dispatch_uses_allocator(construct_alloc, arg_alloc, dtl::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
}\
- BOOST_CATCH(...) {\
+ BOOST_CONTAINER_CATCH(...) {\
allocator_traits<ConstructAlloc>::destroy(construct_alloc, dtl::addressof(p->first));\
- BOOST_RETHROW\
+ BOOST_CONTAINER_RETHROW\
}\
- BOOST_CATCH_END\
+ BOOST_CONTAINER_CATCH_END\
}\
//
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE)
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/node_alloc_holder.hpp b/contrib/restricted/boost/container/include/boost/container/detail/node_alloc_holder.hpp
index 3efdb0f8ce..8db384e4f6 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/node_alloc_holder.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/node_alloc_holder.hpp
@@ -45,8 +45,6 @@
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#include <boost/move/detail/fwd_macros.hpp>
#endif
-// other
-#include <boost/core/no_exceptions_support.hpp>
namespace boost {
@@ -417,26 +415,26 @@ struct node_alloc_holder
NodePtr create_node_from_key(BOOST_FWD_REF(KeyConvertible) key)
{
NodePtr p = this->allocate_one();
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t()) Node;
NodeAlloc &na = this->node_alloc();
node_allocator_traits_type::construct
(na, dtl::addressof(p->get_real_data().first), boost::forward<KeyConvertible>(key));
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
node_allocator_traits_type::construct(na, dtl::addressof(p->get_real_data().second));
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
node_allocator_traits_type::destroy(na, dtl::addressof(p->get_real_data().first));
- BOOST_RETHROW;
+ BOOST_CONTAINER_RETHROW;
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
- BOOST_CATCH(...) {
+ BOOST_CONTAINER_CATCH(...) {
p->destroy_header();
this->node_alloc().deallocate(p, 1);
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
return (p);
}
@@ -470,7 +468,7 @@ struct node_alloc_holder
chain.clear();
Node *p = 0;
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
Deallocator node_deallocator(NodePtr(), nalloc);
dtl::scoped_node_destructor<NodeAlloc> sdestructor(nalloc, 0);
while(n){
@@ -490,12 +488,12 @@ struct node_alloc_holder
sdestructor.release();
node_deallocator.release();
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
chain.incorporate_after(chain.last(), &*itbeg, &*itlast, n);
node_allocator_version_traits_type::deallocate_individual(this->node_alloc(), chain);
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
}
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/placement_new.hpp b/contrib/restricted/boost/container/include/boost/container/detail/placement_new.hpp
index 73db6c1827..6d7ead8809 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/placement_new.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/placement_new.hpp
@@ -10,14 +10,6 @@
//
///////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
#include <cstddef>
struct boost_container_new_t{};
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/tree.hpp b/contrib/restricted/boost/container/include/boost/container/detail/tree.hpp
index 7f26e1f712..843ad3cb78 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/tree.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/tree.hpp
@@ -53,8 +53,6 @@
#endif
#include <boost/move/detail/move_helpers.hpp>
#include <boost/move/detail/force_ptr.hpp>
-// other
-#include <boost/core/no_exceptions_support.hpp>
@@ -311,20 +309,20 @@ class RecyclingCloner
{
if(node_ptr_type p = m_icont.unlink_leftmost_without_rebalance()){
//First recycle a node (this can't throw)
- BOOST_TRY{
+ BOOST_CONTAINER_TRY{
//This can throw
this->do_assign(p, other, bool_<DoMove>());
return p;
}
- BOOST_CATCH(...){
+ BOOST_CONTAINER_CATCH(...){
//If there is an exception destroy the whole source
m_holder.destroy_node(p);
while((p = m_icont.unlink_leftmost_without_rebalance())){
m_holder.destroy_node(p);
}
- BOOST_RETHROW
+ BOOST_CONTAINER_RETHROW
}
- BOOST_CATCH_END
+ BOOST_CONTAINER_CATCH_END
}
else{
return m_holder.create_node(boost::move(other.get_real_data()));
@@ -425,7 +423,8 @@ class tree
public:
- typedef typename key_of_value_t::type key_type;
+ typedef typename dtl::remove_const
+ <typename key_of_value_t::type>::type key_type;
typedef T value_type;
typedef Compare key_compare;
typedef ValComp value_compare;
diff --git a/contrib/restricted/boost/container/include/boost/container/detail/workaround.hpp b/contrib/restricted/boost/container/include/boost/container/detail/workaround.hpp
index d1c4824e83..64daa0c1d9 100644
--- a/contrib/restricted/boost/container/include/boost/container/detail/workaround.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/detail/workaround.hpp
@@ -152,6 +152,39 @@
//#define BOOST_CONTAINER_USE_STD_EXCEPTIONS
+namespace boost {
+namespace container {
+template <typename T1>
+BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore(T1 const&)
+{}
+
+}} //namespace boost::container {
+
+#if !(defined BOOST_NO_EXCEPTIONS)
+# define BOOST_CONTAINER_TRY { try
+# define BOOST_CONTAINER_CATCH(x) catch(x)
+# define BOOST_CONTAINER_RETHROW throw;
+# define BOOST_CONTAINER_CATCH_END }
+#else
+# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
+# define BOOST_CONTAINER_TRY { if (true)
+# define BOOST_CONTAINER_CATCH(x) else if (false)
+# else
+// warning C4127: conditional expression is constant
+# define BOOST_CONTAINER_TRY { \
+ __pragma(warning(push)) \
+ __pragma(warning(disable: 4127)) \
+ if (true) \
+ __pragma(warning(pop))
+# define BOOST_CONTAINER_CATCH(x) else \
+ __pragma(warning(push)) \
+ __pragma(warning(disable: 4127)) \
+ if (false) \
+ __pragma(warning(pop))
+# endif
+# define BOOST_CONTAINER_RETHROW
+# define BOOST_CONTAINER_CATCH_END }
+#endif
#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
diff --git a/contrib/restricted/boost/container/include/boost/container/node_handle.hpp b/contrib/restricted/boost/container/include/boost/container/node_handle.hpp
index 803271141c..323b79c348 100644
--- a/contrib/restricted/boost/container/include/boost/container/node_handle.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/node_handle.hpp
@@ -30,7 +30,8 @@
#include <boost/move/utility_core.hpp>
#include <boost/move/adl_move_swap.hpp>
-#include <boost/type_traits/aligned_storage.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/assert.hpp>
//!\file
@@ -111,15 +112,16 @@ class node_handle
BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle)
typedef typename nator_traits::pointer node_pointer;
- typedef ::boost::aligned_storage
+ typedef typename dtl::aligned_storage
< sizeof(nallocator_type)
- , boost::alignment_of<nallocator_type>::value> nalloc_storage_t;
+ , dtl::alignment_of<nallocator_type>::value
+ >::type nalloc_storage_t;
node_pointer m_ptr;
nalloc_storage_t m_nalloc_storage;
void move_construct_alloc(nallocator_type &al)
- { ::new(m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(::boost::move(al)); }
+ { ::new((void*)m_nalloc_storage.data, boost_container_new_t()) nallocator_type(::boost::move(al)); }
void destroy_deallocate_node()
{
@@ -131,7 +133,7 @@ class node_handle
void move_construct_end(OtherNodeHandle &nh)
{
if(m_ptr){
- ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(::boost::move(nh.node_alloc()));
+ ::new ((void*)m_nalloc_storage.data, boost_container_new_t()) nallocator_type(::boost::move(nh.node_alloc()));
node_handle_friend::destroy_alloc(nh);
node_handle_friend::get_node_pointer(nh) = node_pointer();
}
@@ -139,7 +141,7 @@ class node_handle
}
void destroy_alloc() BOOST_NOEXCEPT
- { static_cast<nallocator_type*>(m_nalloc_storage.address())->~nallocator_type(); }
+ { static_cast<nallocator_type*>((void*)m_nalloc_storage.data)->~nallocator_type(); }
node_pointer &get_node_pointer() BOOST_NOEXCEPT
{ return m_ptr; }
@@ -160,7 +162,7 @@ class node_handle
: m_ptr(p)
{
if(m_ptr){
- ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(al);
+ ::new ((void*)m_nalloc_storage.data, boost_container_new_t()) nallocator_type(al);
}
}
@@ -373,7 +375,7 @@ class node_handle
nallocator_type &node_alloc() BOOST_NOEXCEPT
{
BOOST_ASSERT(!empty());
- return *static_cast<nallocator_type*>(m_nalloc_storage.address());
+ return *static_cast<nallocator_type*>((void*)m_nalloc_storage.data);
}
@@ -383,7 +385,7 @@ class node_handle
const nallocator_type &node_alloc() const BOOST_NOEXCEPT
{
BOOST_ASSERT(!empty());
- return *static_cast<const nallocator_type*>(m_nalloc_storage.address());
+ return *static_cast<const nallocator_type*>((const void*)m_nalloc_storage.data);
}
//! <b>Effects</b>: x.swap(y).
diff --git a/contrib/restricted/boost/container/include/boost/container/pmr/memory_resource.hpp b/contrib/restricted/boost/container/include/boost/container/pmr/memory_resource.hpp
index e99fd0206a..4187f05f3c 100644
--- a/contrib/restricted/boost/container/include/boost/container/pmr/memory_resource.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/pmr/memory_resource.hpp
@@ -54,7 +54,7 @@ class memory_resource
{ return this->do_deallocate(p, bytes, alignment); }
//! <b>Effects</b>: Equivalent to
- //! `return return do_is_equal(other);`
+ //! `return do_is_equal(other);`
bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT
{ return this->do_is_equal(other); }
diff --git a/contrib/restricted/boost/container/include/boost/container/scoped_allocator.hpp b/contrib/restricted/boost/container/include/boost/container/scoped_allocator.hpp
index e9720fe2c8..3e9c6847a2 100644
--- a/contrib/restricted/boost/container/include/boost/container/scoped_allocator.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/scoped_allocator.hpp
@@ -38,8 +38,6 @@
#endif
#include <boost/move/utility_core.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-
namespace boost { namespace container {
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
diff --git a/contrib/restricted/boost/container/include/boost/container/small_vector.hpp b/contrib/restricted/boost/container/include/boost/container/small_vector.hpp
index 2ad0410d3d..66b31954d7 100644
--- a/contrib/restricted/boost/container/include/boost/container/small_vector.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/small_vector.hpp
@@ -345,7 +345,7 @@ class small_vector_base
public:
//Make it public as it will be inherited by small_vector and container
//must have this public member
- typedef typename real_allocator<T, SecAlloc>::type secondary_allocator_t;
+ typedef typename real_allocator<T, SecAlloc>::type secondary_allocator_t;
typedef typename allocator_traits<secondary_allocator_t>::
template portable_rebind_alloc<void>::type void_allocator_t;
typedef typename dtl::get_small_vector_opt<Options>::type options_t;
@@ -387,6 +387,24 @@ class small_vector_base
: base_type(initial_capacity_t(), this->internal_storage(), capacity, ::boost::forward<AllocFwd>(a))
{}
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(maybe_initial_capacity_t, std::size_t initial_capacity, std::size_t initial_size)
+ : base_type( maybe_initial_capacity_t()
+ , (initial_capacity >= initial_size) ? this->internal_storage() : pointer()
+ , (initial_capacity >= initial_size) ? initial_capacity : initial_size
+ )
+ {}
+
+ template<class AllocFwd>
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(maybe_initial_capacity_t, std::size_t initial_capacity, std::size_t initial_size, BOOST_FWD_REF(AllocFwd) a)
+ : base_type(maybe_initial_capacity_t()
+ , (initial_capacity >= initial_size) ? this->internal_storage() : pointer()
+ , (initial_capacity >= initial_size) ? initial_capacity : initial_size
+ , ::boost::forward<AllocFwd>(a)
+ )
+ {}
+
+ using base_type::protected_set_size;
+
//~small_vector_base(){}
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
@@ -408,9 +426,10 @@ class small_vector_base
this->steal_resources(x);
}
else{
- this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
- , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end ()))
- );
+ const typename base_type::size_type sz = x.size();
+ ::boost::container::uninitialized_move_alloc_n_source
+ (this->base_type::get_stored_allocator(), x.begin(), sz, this->begin());
+ this->protected_set_size(sz);
x.clear();
}
}
@@ -546,28 +565,28 @@ class small_vector
{}
BOOST_CONTAINER_FORCEINLINE explicit small_vector(size_type n)
- : base_type(initial_capacity_t(), internal_capacity())
- { this->resize(n); }
+ : base_type(maybe_initial_capacity_t(), internal_capacity(), n)
+ { this->protected_init_n(n, value_init); }
BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->resize(n); }
+ : base_type(maybe_initial_capacity_t(), internal_capacity(), n, a)
+ { this->protected_init_n(n, value_init); }
BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t)
- : base_type(initial_capacity_t(), internal_capacity())
- { this->resize(n, default_init_t()); }
+ : base_type(maybe_initial_capacity_t(), internal_capacity(), n)
+ { this->protected_init_n(n, default_init_t()); }
BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->resize(n, default_init_t()); }
+ : base_type(maybe_initial_capacity_t(), internal_capacity(), n, a)
+ { this->protected_init_n(n, default_init_t()); }
BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v)
- : base_type(initial_capacity_t(), internal_capacity())
- { this->resize(n, v); }
+ : base_type(maybe_initial_capacity_t(), internal_capacity(), n)
+ { this->protected_init_n(n, v); }
BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->resize(n, v); }
+ : base_type(maybe_initial_capacity_t(), internal_capacity(), n, a)
+ { this->protected_init_n(n, v); }
template <class InIt>
BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last
diff --git a/contrib/restricted/boost/container/include/boost/container/throw_exception.hpp b/contrib/restricted/boost/container/include/boost/container/throw_exception.hpp
index f80c905b12..a49f222fb9 100644
--- a/contrib/restricted/boost/container/include/boost/container/throw_exception.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/throw_exception.hpp
@@ -21,7 +21,6 @@
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
-#include <boost/core/ignore_unused.hpp>
#ifndef BOOST_NO_EXCEPTIONS
#include <exception> //for std exception base
@@ -156,28 +155,28 @@ namespace container {
BOOST_NORETURN inline void throw_out_of_range(const char* str)
{
- boost::ignore_unused(str);
+ boost::container::ignore(str);
BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str);
std::abort();
}
BOOST_NORETURN inline void throw_length_error(const char* str)
{
- boost::ignore_unused(str);
+ boost::container::ignore(str);
BOOST_ASSERT_MSG(!"boost::container length_error thrown", str);
std::abort();
}
BOOST_NORETURN inline void throw_logic_error(const char* str)
{
- boost::ignore_unused(str);
+ boost::container::ignore(str);
BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str);
std::abort();
}
BOOST_NORETURN inline void throw_runtime_error(const char* str)
{
- boost::ignore_unused(str);
+ boost::container::ignore(str);
BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str);
std::abort();
}
diff --git a/contrib/restricted/boost/container/include/boost/container/vector.hpp b/contrib/restricted/boost/container/include/boost/container/vector.hpp
index a1f3fb1c4f..d5d2f1eacb 100644
--- a/contrib/restricted/boost/container/include/boost/container/vector.hpp
+++ b/contrib/restricted/boost/container/include/boost/container/vector.hpp
@@ -62,7 +62,6 @@
#include <boost/move/algo/predicate.hpp>
#include <boost/move/algo/detail/set_difference.hpp>
// other
-#include <boost/core/no_exceptions_support.hpp>
#include <boost/assert.hpp>
#include <boost/cstdint.hpp>
@@ -258,8 +257,6 @@ struct vector_insert_ordered_cursor
BiDirValueIt last_value_it;
};
-struct initial_capacity_t{};
-
template<class Pointer, bool IsConst>
BOOST_CONTAINER_FORCEINLINE const Pointer &vector_iterator_get_ptr(const vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
{ return it.get_ptr(); }
@@ -268,9 +265,13 @@ template<class Pointer, bool IsConst>
BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr(vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
{ return it.get_ptr(); }
+struct initial_capacity_t {};
+
struct vector_uninitialized_size_t {};
static const vector_uninitialized_size_t vector_uninitialized_size = vector_uninitialized_size_t();
+struct maybe_initial_capacity_t {};
+
template <class T>
struct vector_value_traits_base
{
@@ -313,6 +314,43 @@ struct vector_alloc_holder
typedef typename allocator_traits_type::size_type size_type;
typedef typename allocator_traits_type::value_type value_type;
+
+ private:
+
+ template<class SizeType>
+ void do_initial_capacity(SizeType initial_capacity)
+ {
+ if (BOOST_UNLIKELY(initial_capacity > size_type(-1))) {
+ boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
+ }
+ else if (initial_capacity) {
+ pointer reuse = pointer();
+ size_type final_cap = static_cast<size_type>(initial_capacity);
+ m_start = this->allocation_command(allocate_new, final_cap, final_cap, reuse);
+ this->set_stored_capacity(final_cap);
+ }
+ }
+
+ template<class SizeType>
+ void do_maybe_initial_capacity(pointer p, SizeType initial_capacity)
+ {
+ if (BOOST_UNLIKELY(initial_capacity > size_type(-1))) {
+ boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
+ }
+ else if (p) {
+ m_start = p;
+ }
+ else {
+ BOOST_ASSERT(initial_capacity > 0);
+ pointer reuse = pointer();
+ size_type final_cap = static_cast<size_type>(initial_capacity);
+ m_start = this->allocation_command(allocate_new, final_cap, final_cap, reuse);
+ this->set_stored_capacity(final_cap);
+ }
+ }
+
+ public:
+
BOOST_CONTAINER_FORCEINLINE
static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
{
@@ -344,7 +382,7 @@ struct vector_alloc_holder
: allocator_type(boost::forward<AllocConvertible>(a)), m_start(), m_size(), m_capacity()
{}
- //Constructor, does not throw
+
template<class AllocConvertible, class SizeType>
vector_alloc_holder(vector_uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, SizeType initial_size)
: allocator_type(boost::forward<AllocConvertible>(a))
@@ -352,19 +390,8 @@ struct vector_alloc_holder
//Size is initialized here so vector should only call uninitialized_xxx after this
, m_size(static_cast<stored_size_type>(initial_size))
, m_capacity()
- {
- if (BOOST_UNLIKELY(initial_size > size_type(-1))){
- boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
- }
- else if(initial_size){
- pointer reuse = pointer();
- size_type final_cap = static_cast<size_type>(initial_size);
- m_start = this->allocation_command(allocate_new, final_cap, final_cap, reuse);
- this->set_stored_capacity(final_cap);
- }
- }
+ { this->do_initial_capacity(initial_size); }
- //Constructor, does not throw
template<class SizeType>
vector_alloc_holder(vector_uninitialized_size_t, SizeType initial_size)
: allocator_type()
@@ -372,27 +399,7 @@ struct vector_alloc_holder
//Size is initialized here so vector should only call uninitialized_xxx after this
, m_size(static_cast<stored_size_type>(initial_size))
, m_capacity()
- {
- if (BOOST_UNLIKELY(initial_size > size_type(-1))){
- boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
- }
- else if(initial_size){
- pointer reuse = pointer();
- size_type final_cap = initial_size;
- m_start = this->allocation_command(allocate_new, final_cap, final_cap, reuse);
- this->set_stored_capacity(final_cap);
- }
- }
-
- vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_NOEXCEPT_OR_NOTHROW
- : allocator_type(BOOST_MOVE_BASE(allocator_type, holder))
- , m_start(holder.m_start)
- , m_size(holder.m_size)
- , m_capacity(holder.m_capacity)
- {
- holder.m_start = pointer();
- holder.m_size = holder.m_capacity = 0;
- }
+ { this->do_initial_capacity(initial_size); }
vector_alloc_holder(initial_capacity_t, pointer p, size_type n)
BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<allocator_type>::value)
@@ -411,6 +418,34 @@ struct vector_alloc_holder
, m_capacity(n)
{}
+ template<class AllocConvertible, class SizeType>
+ vector_alloc_holder(maybe_initial_capacity_t, pointer p, SizeType initial_capacity, BOOST_FWD_REF(AllocConvertible) a)
+ : allocator_type(boost::forward<AllocConvertible>(a))
+ //, m_start()
+ //Size is initialized here so vector should only call uninitialized_xxx after this
+ , m_size()
+ , m_capacity(static_cast<stored_size_type>(initial_capacity))
+ { this->do_maybe_initial_capacity(p, initial_capacity); }
+
+ template<class SizeType>
+ vector_alloc_holder(maybe_initial_capacity_t, pointer p, SizeType initial_capacity)
+ : allocator_type()
+ //, m_start()
+ //Size is initialized here so vector should only call uninitialized_xxx after this
+ , m_size()
+ , m_capacity(static_cast<stored_size_type>(initial_capacity))
+ { this->do_maybe_initial_capacity(p, initial_capacity); }
+
+ vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_NOEXCEPT_OR_NOTHROW
+ : allocator_type(BOOST_MOVE_BASE(allocator_type, holder))
+ , m_start(holder.m_start)
+ , m_size(holder.m_size)
+ , m_capacity(holder.m_capacity)
+ {
+ holder.m_start = pointer();
+ holder.m_size = holder.m_capacity = 0;
+ }
+
BOOST_CONTAINER_FORCEINLINE ~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW
{
if(this->m_capacity){
@@ -823,6 +858,9 @@ private:
BOOST_CONTAINER_FORCEINLINE void steal_resources(vector &x)
{ return this->m_holder.steal_resources(x.m_holder); }
+ BOOST_CONTAINER_FORCEINLINE void protected_set_size(size_type n)
+ { this->m_holder.m_size = static_cast<stored_size_type>(n); }
+
template<class AllocFwd>
BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type cap, BOOST_FWD_REF(AllocFwd) a)
: m_holder(initial_capacity_t(), initial_memory, cap, ::boost::forward<AllocFwd>(a))
@@ -832,6 +870,32 @@ private:
: m_holder(initial_capacity_t(), initial_memory, cap)
{}
+ template<class SizeType, class AllocFwd>
+ BOOST_CONTAINER_FORCEINLINE vector(maybe_initial_capacity_t, pointer p, SizeType initial_capacity, BOOST_FWD_REF(AllocFwd) a)
+ : m_holder(maybe_initial_capacity_t(), p, initial_capacity, ::boost::forward<AllocFwd>(a))
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += size_type(p != pointer());
+ #endif
+ }
+
+ template<class SizeType>
+ BOOST_CONTAINER_FORCEINLINE vector(maybe_initial_capacity_t, pointer p, SizeType initial_capacity)
+ : m_holder(maybe_initial_capacity_t(), p, initial_capacity)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += size_type(p != pointer());
+ #endif
+ }
+
+ template <class U>
+ void protected_init_n(const size_type new_size, const U& u)
+ {
+ BOOST_ASSERT(this->empty());
+ this->priv_resize_proxy(u).uninitialized_copy_n_and_update(this->m_holder.alloc(), this->priv_raw_begin(), new_size);
+ this->m_holder.set_stored_size(new_size);
+ }
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
public:
diff --git a/contrib/restricted/boost/container/src/global_resource.cpp b/contrib/restricted/boost/container/src/global_resource.cpp
index b3fa7611ca..af273ae9ec 100644
--- a/contrib/restricted/boost/container/src/global_resource.cpp
+++ b/contrib/restricted/boost/container/src/global_resource.cpp
@@ -11,7 +11,6 @@
#define BOOST_CONTAINER_SOURCE
#include <boost/container/pmr/memory_resource.hpp>
#include <boost/container/pmr/global_resource.hpp>
-#include <boost/core/no_exceptions_support.hpp>
#include <boost/container/throw_exception.hpp>
#include <boost/container/detail/dlmalloc.hpp> //For global lock
#include <boost/container/detail/singleton.hpp>
@@ -128,7 +127,7 @@ namespace container {
namespace pmr {
std::atomic<memory_resource*>& default_memory_resource_instance() {
- static std::atomic<memory_resource*> instance = new_delete_resource();
+ static std::atomic<memory_resource*> instance(new_delete_resource());
return instance;
}
diff --git a/contrib/restricted/boost/container/src/pool_resource.cpp b/contrib/restricted/boost/container/src/pool_resource.cpp
index 82105a4520..631c9d8f4c 100644
--- a/contrib/restricted/boost/container/src/pool_resource.cpp
+++ b/contrib/restricted/boost/container/src/pool_resource.cpp
@@ -20,6 +20,7 @@
#include <boost/container/detail/placement_new.hpp>
#include <boost/intrusive/linear_slist_algorithms.hpp>
#include <boost/intrusive/detail/math.hpp>
+#include <boost/static_assert.hpp>
#include <cstddef>