Update node containers to no longer memcpy their pointer arrays

This commit is contained in:
Christian Mazakas
2023-01-10 15:18:46 -08:00
parent 3201a014c4
commit 904e806b1e
3 changed files with 10 additions and 5 deletions

View File

@ -1668,9 +1668,9 @@ private:
bool,
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
/* std::is_trivially_copy_constructible not provided */
boost::has_trivial_copy<value_type>::value
boost::has_trivial_copy<element_type>::value
#else
std::is_trivially_copy_constructible<value_type>::value
std::is_trivially_copy_constructible<element_type>::value
#endif
&&(
is_std_allocator<Allocator>::value||

View File

@ -45,6 +45,9 @@ namespace boost {
struct element_type
{
value_type* p;
element_type() : p(nullptr) {}
element_type(element_type const& rhs) : p(rhs.p) {}
};
static value_type& value_from(element_type x) { return *(x.p); }

View File

@ -16,7 +16,6 @@
#include <boost/core/allocator_access.hpp>
#include <boost/functional/hash.hpp>
#include <boost/iterator/indirect_iterator.hpp>
#include <boost/throw_exception.hpp>
#include <initializer_list>
@ -41,9 +40,9 @@ namespace boost {
static Key const& extract(value_type const& key) { return key; }
#if 1
#if 0
using element_type = value_type*;
static value_type& value_from(element_type x) { return *x; }
static value_type& value_from(element_type& x) { return *x; }
static Key const& extract(element_type k) { return *k; }
static element_type&& move(element_type& x) { return std::move(x); }
@ -99,6 +98,9 @@ namespace boost {
struct element_type
{
value_type* p;
element_type() : p(nullptr) {}
element_type(element_type const& rhs) : p(rhs.p) {}
};
static value_type& value_from(element_type x) { return *x.p; }