update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
/* Copyright 2016-2020 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -106,7 +106,7 @@ template<
Function for_each(const Iterator& first,const Iterator& last,Function f)
{
for_each_segment(first,last,restitute_range<Ts...>(for_each_alg{},f));
return std::move(f);
return f;
}
struct for_each_n_alg

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
/* Copyright 2016-2020 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -183,14 +183,17 @@ private:
* https://lists.boost.org/boost-users/2017/05/87556.php
*/
using namespace boost::type_erasure;
using ref_type=any<Concept2,T>;
using make_ref=any_model_make_reference<_self,ref_type>;
using concept_=typename concept_of<value_type>::type;
using ref_type=type_erasure::any<Concept2,T>;
using make_ref=any_model_make_reference<type_erasure::_self,ref_type>;
using concept_=typename type_erasure::concept_of<value_type>::type;
auto b=make_binding<mpl::map1<mpl::pair<_self,ref_type>>>();
auto b=type_erasure::make_binding<
mpl::map1<mpl::pair<type_erasure::_self,ref_type>>>();
return {call(binding<make_ref>{b},make_ref{},x),binding<concept_>{b}};
return {
type_erasure::call(type_erasure::binding<make_ref>{b},make_ref{},x),
type_erasure::binding<concept_>{b}
};
}
};

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
/* Copyright 2016-2021 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -13,6 +13,7 @@
#pragma once
#endif
#include <boost/detail/workaround.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/poly_collection/detail/is_constructible.hpp>
@@ -143,6 +144,15 @@ class local_iterator_impl:
using const_segment_map_iterator=
typename PolyCollection::const_segment_map_iterator;
#if BOOST_WORKAROUND(BOOST_GCC_VERSION,>=90300)&&\
BOOST_WORKAROUND(BOOST_GCC_VERSION,<100300)
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95888 */
public:
#else
private:
#endif
template<typename Iterator>
local_iterator_impl(
const_segment_map_iterator mapit,
@@ -232,7 +242,6 @@ struct poly_collection_of<local_iterator_impl<PolyCollection,BaseIterator>>
using type=PolyCollection;
};
} /* namespace poly_collection::detail */
} /* namespace poly_collection */

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
/* Copyright 2016-2020 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -85,7 +85,7 @@ public:
return new_(al,al);
}
virtual segment_backend_unique_ptr move(const Allocator& al)const
virtual segment_backend_unique_ptr move(const Allocator& al)
{
return new_(al,store{std::move(s),al});
}

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
/* Copyright 2016-2020 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -24,7 +24,7 @@ namespace poly_collection{
namespace detail{
/* Internal *virtual* interface of segment<Model,Allocator> (please note that
* a non-virtual interface exists accessible thrown downcasting). Member
* a non-virtual interface exists accessible through downcasting). Member
* functions have been defined to minimize virtual function calls according to
* usage patterns by poly_collection. For instance, ranges are returned rather
* than iterators to allow for caching of and end sentinel at a higher level.
@@ -53,7 +53,7 @@ struct segment_backend
virtual segment_backend_unique_ptr copy()const=0;
virtual segment_backend_unique_ptr copy(const Allocator&)const=0;
virtual segment_backend_unique_ptr empty_copy(const Allocator&)const=0;
virtual segment_backend_unique_ptr move(const Allocator&)const=0;
virtual segment_backend_unique_ptr move(const Allocator&)=0;
virtual bool equal(const segment_backend&)const=0;
virtual Allocator get_allocator()const noexcept=0;

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
/* Copyright 2016-2020 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -97,7 +97,7 @@ public:
return new_(al,al);
}
virtual segment_backend_unique_ptr move(const Allocator& al)const
virtual segment_backend_unique_ptr move(const Allocator& al)
{
return new_(al,store{std::move(s),al});
}

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2017 Joaquin M Lopez Munoz.
/* Copyright 2016-2019 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -13,6 +13,7 @@
#pragma once
#endif
#include <boost/detail/workaround.hpp>
#include <boost/iterator/iterator_facade.hpp>
#include <type_traits>
@@ -72,6 +73,23 @@ public:
explicit stride_iterator(DerivedValue* x)noexcept:
p{x},stride_{sizeof(DerivedValue)}{}
#if BOOST_WORKAROUND(BOOST_GCC_VERSION,>=40900)||\
BOOST_WORKAROUND(BOOST_CLANG,>=1)&&\
(__clang_major__>3 || __clang_major__==3 && __clang_minor__ >= 8)
/* https://github.com/boostorg/poly_collection/issues/15 */
#define BOOST_POLY_COLLECTION_NO_SANITIZE
/* UBSan seems not to be supported in some environments */
#if defined(BOOST_GCC_VERSION)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#elif defined(BOOST_CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wattributes"
#endif
#endif
template<
typename DerivedValue,
typename std::enable_if<
@@ -79,9 +97,22 @@ public:
(!std::is_const<Value>::value||std::is_const<DerivedValue>::value)
>::type* =nullptr
>
#if defined(BOOST_POLY_COLLECTION_NO_SANITIZE)
__attribute__((no_sanitize("undefined")))
#endif
explicit operator DerivedValue*()const noexcept
{return static_cast<DerivedValue*>(p);}
#if defined(BOOST_POLY_COLLECTION_NO_SANITIZE)
#if defined(BOOST_GCC_VERSION)
#pragma GCC diagnostic pop
#elif defined(BOOST_CLANG)
#pragma clang diagnostic pop
#endif
#undef BOOST_POLY_COLLECTION_NO_SANITIZE
#endif
std::size_t stride()const noexcept{return stride_;}
private:

View File

@@ -1,4 +1,4 @@
/* Copyright 2016-2018 Joaquin M Lopez Munoz.
/* Copyright 2016-2020 Joaquin M Lopez Munoz.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
@@ -15,6 +15,7 @@
#include <boost/detail/workaround.hpp>
#include <functional>
#include <iterator>
#include <memory>
#include <type_traits>
#include <typeinfo>
@@ -183,7 +184,6 @@ private:
/* std::unordered_map(const allocator_type&),
* std::unordered_map(const unordered_map&,const allocator_type&) and
* std::unordered_map(unordered_map&&,const allocator_type&) not available.
* We make move construction decay to copy construction.
*/
template<typename UnorderedMap>
@@ -200,10 +200,17 @@ private:
const typename std::decay<UnorderedMap>::type::allocator_type& al)
{
using RawUnorderedMap=typename std::decay<UnorderedMap>::type;
using iterator=typename std::conditional<
!std::is_lvalue_reference<UnorderedMap>::value&&
!std::is_const<UnorderedMap>::value,
std::move_iterator<typename RawUnorderedMap::iterator>,
typename RawUnorderedMap::const_iterator
>::type;
return RawUnorderedMap{
x.begin(),x.end(),0,typename RawUnorderedMap::hasher{},
typename RawUnorderedMap::key_equal{},al
iterator{x.begin()},iterator{x.end()},0,
typename RawUnorderedMap::hasher{},typename RawUnorderedMap::key_equal{},
al
};
}
#else