mirror of
https://github.com/boostorg/container.git
synced 2025-07-31 13:07:17 +02:00
Remove some Wmaybe-uninitialized warnings for GCC 11
This commit is contained in:
@ -131,8 +131,8 @@ struct insert_value_initialized_n_proxy
|
||||
while (n){
|
||||
--n;
|
||||
storage_t v;
|
||||
value_type *vp = move_detail::force_ptr<value_type *>(static_cast<void *>(v.data));
|
||||
alloc_traits::construct(a, vp);
|
||||
alloc_traits::construct(a, move_detail::force_ptr<value_type *>(&v));
|
||||
value_type *vp = move_detail::force_ptr<value_type *>(&v);
|
||||
value_destructor<Allocator> on_exit(a, *vp); (void)on_exit;
|
||||
*p = ::boost::move(*vp);
|
||||
++p;
|
||||
@ -156,8 +156,8 @@ struct insert_default_initialized_n_proxy
|
||||
while (n){
|
||||
--n;
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
|
||||
value_type *vp = move_detail::force_ptr<value_type *>(v.data);
|
||||
alloc_traits::construct(a, vp, default_init);
|
||||
alloc_traits::construct(a, move_detail::force_ptr<value_type *>(&v), default_init);
|
||||
value_type *vp = move_detail::force_ptr<value_type *>(&v);
|
||||
value_destructor<Allocator> on_exit(a, *vp); (void)on_exit;
|
||||
*p = ::boost::move(*vp);
|
||||
++p;
|
||||
@ -297,8 +297,8 @@ struct insert_emplace_proxy
|
||||
{
|
||||
BOOST_ASSERT(n ==1); (void)n;
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
|
||||
value_type *vp = move_detail::force_ptr<value_type *>(v.data);
|
||||
alloc_traits::construct(a, vp, ::boost::forward<Args>(get<IdxPack>(this->args_))...);
|
||||
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{
|
||||
*p = ::boost::move(*vp);
|
||||
}
|
||||
@ -417,8 +417,8 @@ struct insert_emplace_proxy_arg##N\
|
||||
{\
|
||||
BOOST_ASSERT(n == 1); (void)n;\
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
|
||||
value_type *vp = move_detail::force_ptr<value_type *>(v.data);\
|
||||
alloc_traits::construct(a, vp BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
|
||||
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{\
|
||||
*p = ::boost::move(*vp);\
|
||||
}\
|
||||
|
@ -961,9 +961,9 @@ class flat_tree
|
||||
std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
|
||||
stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v), ::boost::forward<Args>(args)... );
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);
|
||||
return this->insert_unique(::boost::move(*pval));
|
||||
}
|
||||
@ -973,9 +973,9 @@ class flat_tree
|
||||
{
|
||||
//hint checked in insert_unique
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
|
||||
stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v), ::boost::forward<Args>(args)... );
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);
|
||||
return this->insert_unique(hint, ::boost::move(*pval));
|
||||
}
|
||||
@ -984,9 +984,9 @@ class flat_tree
|
||||
iterator emplace_equal(BOOST_FWD_REF(Args)... args)
|
||||
{
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
|
||||
stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v), ::boost::forward<Args>(args)... );
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);
|
||||
return this->insert_equal(::boost::move(*pval));
|
||||
}
|
||||
@ -996,9 +996,9 @@ class flat_tree
|
||||
{
|
||||
//hint checked in insert_equal
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
|
||||
stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v), ::boost::forward<Args>(args)... );
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);
|
||||
return this->insert_equal(hint, ::boost::move(*pval));
|
||||
}
|
||||
@ -1030,9 +1030,9 @@ class flat_tree
|
||||
std::pair<iterator, bool> emplace_unique(BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);\
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
|
||||
stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);\
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);\
|
||||
return this->insert_unique(::boost::move(*pval));\
|
||||
}\
|
||||
@ -1041,9 +1041,9 @@ class flat_tree
|
||||
iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);\
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
|
||||
stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);\
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);\
|
||||
return this->insert_unique(hint, ::boost::move(*pval));\
|
||||
}\
|
||||
@ -1052,9 +1052,9 @@ class flat_tree
|
||||
iterator emplace_equal(BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);\
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
|
||||
stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);\
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);\
|
||||
return this->insert_equal(::boost::move(*pval));\
|
||||
}\
|
||||
@ -1063,9 +1063,9 @@ class flat_tree
|
||||
iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
||||
{\
|
||||
typename dtl::aligned_storage <sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(v.data);\
|
||||
get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
|
||||
stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
stored_allocator_traits::construct(a, move_detail::force_ptr<value_type *>(&v) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
value_type *pval = move_detail::force_ptr<value_type *>(&v);\
|
||||
value_destructor<stored_allocator_type, value_type> d(a, *pval);\
|
||||
return this->insert_equal(hint, ::boost::move(*pval));\
|
||||
}\
|
||||
|
Reference in New Issue
Block a user