Update boost to 1.71 and add asio

This commit is contained in:
fearlessTobi 2019-08-24 15:39:04 +02:00
parent 0b920df1c9
commit 43274a0449
1233 changed files with 231689 additions and 5532 deletions

View file

@ -195,7 +195,7 @@ class flat_map
typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
//AllocatorOrContainer::value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename allocator_type::value_type>::value));
BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, value_type>::value));
//////////////////////////////////////////////
//
@ -319,6 +319,21 @@ class flat_map
: m_flat_tree(ordered_range, first, last, comp, dtl::force<const impl_allocator_type>(a))
{}
//! <b>Effects</b>: Constructs an empty flat_map using the specified allocator and
//! inserts elements from the ordered range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a)
: m_flat_tree(ordered_range, first, last, Compare(), a)
{}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Constructs an empty flat_map and
//! inserts elements from the range [il.begin() ,il.end()).
@ -775,10 +790,10 @@ class flat_map
template <class M>
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
{
return dtl::force_copy< std::pair<iterator, bool> >
return dtl::force_copy<iterator>
(this->m_flat_tree.insert_or_assign
( dtl::force_copy<impl_const_iterator>(hint)
, k, ::boost::forward<M>(obj))
, k, ::boost::forward<M>(obj)).first
);
}
@ -799,10 +814,10 @@ class flat_map
template <class M>
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{
return dtl::force_copy< std::pair<iterator, bool> >
return dtl::force_copy<iterator>
(this->m_flat_tree.insert_or_assign
( dtl::force_copy<impl_const_iterator>(hint)
, ::boost::move(k), ::boost::forward<M>(obj))
, ::boost::move(k), ::boost::forward<M>(obj)).first
);
}
@ -1338,7 +1353,27 @@ class flat_map
//! <b>Complexity</b>: log(size())+count(k)
template<class K>
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
{ return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
//Don't use find() != end optimization here as transparent comparators with key K might
//return a different range than key_type (which can only return a single element range)
{ return m_flat_tree.count(x); }
//! <b>Returns</b>: Returns true if there is an element with key
//! equivalent to key in the container, otherwise false.
//!
//! <b>Complexity</b>: log(size()).
bool contains(const key_type& x) const
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
//! <b>Requires</b>: This overload is available only if
//! key_compare::is_transparent exists.
//!
//! <b>Returns</b>: Returns true if there is an element with key
//! equivalent to key in the container, otherwise false.
//!
//! <b>Complexity</b>: log(size()).
template<typename K>
bool contains(const K& x) const
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
//! <b>Returns</b>: An iterator pointing to the first element with key not less
//! than k, or a.end() if such an element is not found.
@ -1432,7 +1467,9 @@ class flat_map
//! <b>Complexity</b>: Logarithmic.
template<class K>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
{ return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
//Don't use lower_bound_range optimization here as transparent comparators with key K might
//return a different range than key_type (which can only return a single element range)
{ return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
//! <b>Requires</b>: This overload is available only if
//! key_compare::is_transparent exists.
@ -1442,7 +1479,9 @@ class flat_map
//! <b>Complexity</b>: Logarithmic.
template<class K>
BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
{ return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
//Don't use lower_bound_range optimization here as transparent comparators with key K might
//return a different range than key_type (which can only return a single element range)
{ return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
//! <b>Effects</b>: Extracts the internal sequence container.
//!
@ -1545,55 +1584,65 @@ class flat_map
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
};
#if __cplusplus >= 201703L
#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
template <typename InputIterator>
flat_map(InputIterator, InputIterator) ->
flat_map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type>;
flat_map< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>>;
template <typename InputIterator, typename Allocator>
flat_map(InputIterator, InputIterator, Allocator const&) ->
flat_map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
, Allocator>;
template < typename InputIterator, typename AllocatorOrCompare>
flat_map(InputIterator, InputIterator, AllocatorOrCompare const&) ->
flat_map< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, typename dtl::if_c< // Compare
dtl::is_allocator<AllocatorOrCompare>::value
, std::less<it_based_non_const_first_type_t<InputIterator>>
, AllocatorOrCompare
>::type
, typename dtl::if_c< // Allocator
dtl::is_allocator<AllocatorOrCompare>::value
, AllocatorOrCompare
, new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
>::type
>;
template <typename InputIterator, typename Compare>
flat_map(InputIterator, InputIterator, Compare const&) ->
flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, Compare>;
template <typename InputIterator, typename Compare, typename Allocator>
template < typename InputIterator, typename Compare, typename Allocator
, typename = dtl::require_nonallocator_t<Compare>
, typename = dtl::require_allocator_t<Allocator>>
flat_map(InputIterator, InputIterator, Compare const&, Allocator const&) ->
flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
flat_map< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, Compare
, Allocator>;
template <typename InputIterator>
flat_map(ordered_unique_range_t, InputIterator, InputIterator) ->
flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type>;
flat_map< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>>;
template <typename InputIterator, typename Allocator>
flat_map(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
, Allocator>;
template < typename InputIterator, typename AllocatorOrCompare>
flat_map(ordered_unique_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
flat_map< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, typename dtl::if_c< // Compare
dtl::is_allocator<AllocatorOrCompare>::value
, std::less<it_based_non_const_first_type_t<InputIterator>>
, AllocatorOrCompare
>::type
, typename dtl::if_c< // Allocator
dtl::is_allocator<AllocatorOrCompare>::value
, AllocatorOrCompare
, new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
>::type
>;
template <typename InputIterator, typename Compare>
flat_map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, Compare>;
template <typename InputIterator, typename Compare, typename Allocator>
template < typename InputIterator, typename Compare, typename Allocator
, typename = dtl::require_nonallocator_t<Compare>
, typename = dtl::require_allocator_t<Allocator>>
flat_map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
flat_map< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, Compare
, Allocator>;
@ -1608,10 +1657,10 @@ flat_map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, A
template <class Key, class T, class Compare, class AllocatorOrContainer>
struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Compare, AllocatorOrContainer> >
{
typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
::boost::has_trivial_destructor_after_move<pointer>::value &&
::boost::has_trivial_destructor_after_move<Compare>::value;
typedef ::boost::container::dtl::pair<Key, T> value_t;
typedef typename ::boost::container::dtl::container_or_allocator_rebind<AllocatorOrContainer, value_t>::type alloc_or_cont_t;
typedef ::boost::container::dtl::flat_tree<value_t,::boost::container::dtl::select1st<Key>, Compare, alloc_or_cont_t> tree;
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
};
namespace container {
@ -1730,7 +1779,7 @@ class flat_multimap
typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
//AllocatorOrContainer::value_type must be std::pair<Key, T>
BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename AllocatorOrContainer::value_type>::value));
BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, value_type>::value));
//////////////////////////////////////////////
//
@ -1860,6 +1909,21 @@ class flat_multimap
: m_flat_tree(ordered_range, first, last, comp, a)
{}
//! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
//! inserts elements from the ordered range [first ,last). This function
//! is more efficient than the normal range creation for ordered ranges.
//!
//! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
//!
//! <b>Complexity</b>: Linear in N.
//!
//! <b>Note</b>: Non-standard extension.
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a)
: m_flat_tree(ordered_range, first, last, Compare(), a)
{}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
//! <b>Effects</b>: Constructs an empty flat_map and
//! inserts elements from the range [il.begin(), il.end()).
@ -2631,6 +2695,24 @@ class flat_multimap
BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
{ return m_flat_tree.count(x); }
//! <b>Returns</b>: Returns true if there is an element with key
//! equivalent to key in the container, otherwise false.
//!
//! <b>Complexity</b>: log(size()).
bool contains(const key_type& x) const
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
//! <b>Requires</b>: This overload is available only if
//! key_compare::is_transparent exists.
//!
//! <b>Returns</b>: Returns true if there is an element with key
//! equivalent to key in the container, otherwise false.
//!
//! <b>Complexity</b>: log(size()).
template<typename K>
bool contains(const K& x) const
{ return m_flat_tree.find(x) != m_flat_tree.end(); }
//! <b>Returns</b>: An iterator pointing to the first element with key not less
//! than k, or a.end() if such an element is not found.
//!
@ -2810,57 +2892,67 @@ class flat_multimap
{ x.swap(y); }
};
#if __cplusplus >= 201703L
#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
template <typename InputIterator>
flat_multimap(InputIterator, InputIterator) ->
flat_multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type>;
flat_multimap< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>>;
template <typename InputIterator, typename Allocator>
flat_multimap(InputIterator, InputIterator, Allocator const&) ->
flat_multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
, Allocator>;
template < typename InputIterator, typename AllocatorOrCompare>
flat_multimap(InputIterator, InputIterator, AllocatorOrCompare const&) ->
flat_multimap< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, typename dtl::if_c< // Compare
dtl::is_allocator<AllocatorOrCompare>::value
, std::less<it_based_non_const_first_type_t<InputIterator>>
, AllocatorOrCompare
>::type
, typename dtl::if_c< // Allocator
dtl::is_allocator<AllocatorOrCompare>::value
, AllocatorOrCompare
, new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
>::type
>;
template <typename InputIterator, typename Compare>
flat_multimap(InputIterator, InputIterator, Compare const&) ->
flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, Compare>;
template <typename InputIterator, typename Compare, typename Allocator>
template < typename InputIterator, typename Compare, typename Allocator
, typename = dtl::require_nonallocator_t<Compare>
, typename = dtl::require_allocator_t<Allocator>>
flat_multimap(InputIterator, InputIterator, Compare const&, Allocator const&) ->
flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, Compare
, Allocator>;
flat_multimap< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, Compare
, Allocator>;
template <typename InputIterator>
flat_multimap(ordered_range_t, InputIterator, InputIterator) ->
flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type>;
flat_multimap< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>>;
template <typename InputIterator, typename Allocator>
flat_multimap(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
, Allocator>;
template < typename InputIterator, typename AllocatorOrCompare>
flat_multimap(ordered_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
flat_multimap< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, typename dtl::if_c< // Compare
dtl::is_allocator<AllocatorOrCompare>::value
, std::less<it_based_non_const_first_type_t<InputIterator>>
, AllocatorOrCompare
>::type
, typename dtl::if_c< // Allocator
dtl::is_allocator<AllocatorOrCompare>::value
, AllocatorOrCompare
, new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
>::type
>;
template <typename InputIterator, typename Compare>
flat_multimap(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, Compare>;
template <typename InputIterator, typename Compare, typename Allocator>
template < typename InputIterator, typename Compare, typename Allocator
, typename = dtl::require_nonallocator_t<Compare>
, typename = dtl::require_allocator_t<Allocator>>
flat_multimap(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
, typename iterator_traits<InputIterator>::value_type::second_type
, Compare
, Allocator>;
flat_multimap< it_based_non_const_first_type_t<InputIterator>
, it_based_second_type_t<InputIterator>
, Compare
, Allocator>;
#endif
@ -2875,10 +2967,10 @@ namespace boost {
template <class Key, class T, class Compare, class AllocatorOrContainer>
struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T, Compare, AllocatorOrContainer> >
{
typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
::boost::has_trivial_destructor_after_move<pointer>::value &&
::boost::has_trivial_destructor_after_move<Compare>::value;
typedef ::boost::container::dtl::pair<Key, T> value_t;
typedef typename ::boost::container::dtl::container_or_allocator_rebind<AllocatorOrContainer, value_t>::type alloc_or_cont_t;
typedef ::boost::container::dtl::flat_tree<value_t,::boost::container::dtl::select1st<Key>, Compare, alloc_or_cont_t> tree;
static const bool value = ::boost::has_trivial_destructor_after_move<tree>::value;
};
} //namespace boost {