forked from boostorg/unordered
Remove dependency on TypeTraits
This commit is contained in:
@@ -9,13 +9,13 @@
|
||||
#ifndef BOOST_UNORDERED_DETAIL_ARCHIVE_CONSTRUCTED_HPP
|
||||
#define BOOST_UNORDERED_DETAIL_ARCHIVE_CONSTRUCTED_HPP
|
||||
|
||||
#include <boost/unordered/detail/opt_storage.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/core/noncopyable.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace unordered{
|
||||
@@ -54,7 +54,7 @@ struct archive_constructed:private noncopyable
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif
|
||||
|
||||
T& get(){return *reinterpret_cast<T*>(&space);}
|
||||
T& get(){return *space.address();}
|
||||
|
||||
#if defined(BOOST_UNORDERED_IGNORE_WSTRICT_ALIASING)
|
||||
#pragma GCC diagnostic pop
|
||||
@@ -62,7 +62,7 @@ struct archive_constructed:private noncopyable
|
||||
#endif
|
||||
|
||||
private:
|
||||
typename aligned_storage<sizeof(T),alignment_of<T>::value>::type space;
|
||||
opt_storage<T> space;
|
||||
};
|
||||
|
||||
} /* namespace detail */
|
||||
|
||||
@@ -115,6 +115,7 @@ to normal separate chaining implementations.
|
||||
|
||||
#include <boost/unordered/detail/prime_fmod.hpp>
|
||||
#include <boost/unordered/detail/serialize_tracked_address.hpp>
|
||||
#include <boost/unordered/detail/opt_storage.hpp>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
@@ -125,8 +126,6 @@ to normal separate chaining implementations.
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
@@ -143,19 +142,18 @@ namespace boost {
|
||||
node>::type node_pointer;
|
||||
|
||||
node_pointer next;
|
||||
typename boost::aligned_storage<sizeof(value_type),
|
||||
boost::alignment_of<value_type>::value>::type buf;
|
||||
opt_storage<value_type> buf;
|
||||
|
||||
node() noexcept : next(), buf() {}
|
||||
|
||||
value_type* value_ptr() noexcept
|
||||
{
|
||||
return reinterpret_cast<value_type*>(buf.address());
|
||||
return buf.address();
|
||||
}
|
||||
|
||||
value_type& value() noexcept
|
||||
{
|
||||
return *reinterpret_cast<value_type*>(buf.address());
|
||||
return *buf.address();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,13 +22,10 @@
|
||||
#include <boost/core/pointer_traits.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/predef.h>
|
||||
#include <boost/type_traits/has_trivial_constructor.hpp>
|
||||
#include <boost/type_traits/has_trivial_copy.hpp>
|
||||
#include <boost/type_traits/has_trivial_assign.hpp>
|
||||
#include <boost/type_traits/is_nothrow_swappable.hpp>
|
||||
#include <boost/unordered/detail/narrow_cast.hpp>
|
||||
#include <boost/unordered/detail/mulx.hpp>
|
||||
#include <boost/unordered/detail/static_assert.hpp>
|
||||
#include <boost/unordered/detail/type_traits.hpp>
|
||||
#include <boost/unordered/hash_traits.hpp>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
@@ -133,10 +130,10 @@
|
||||
#define BOOST_UNORDERED_THREAD_SANITIZER
|
||||
#endif
|
||||
|
||||
#define BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred) \
|
||||
static_assert(boost::is_nothrow_swappable<Hash>::value, \
|
||||
"Template parameter Hash is required to be nothrow Swappable."); \
|
||||
static_assert(boost::is_nothrow_swappable<Pred>::value, \
|
||||
#define BOOST_UNORDERED_STATIC_ASSERT_HASH_PRED(Hash, Pred) \
|
||||
static_assert(boost::unordered::detail::is_nothrow_swappable<Hash>::value, \
|
||||
"Template parameter Hash is required to be nothrow Swappable."); \
|
||||
static_assert(boost::unordered::detail::is_nothrow_swappable<Pred>::value, \
|
||||
"Template parameter Pred is required to be nothrow Swappable");
|
||||
|
||||
namespace boost{
|
||||
@@ -1054,13 +1051,7 @@ struct table_arrays
|
||||
initialize_groups(
|
||||
arrays.groups(),groups_size,
|
||||
std::integral_constant<
|
||||
bool,
|
||||
#if BOOST_WORKAROUND(BOOST_LIBSTDCXX_VERSION,<50000)
|
||||
/* std::is_trivially_constructible not provided */
|
||||
boost::has_trivial_constructor<group_type>::value
|
||||
#else
|
||||
std::is_trivially_constructible<group_type>::value
|
||||
#endif
|
||||
bool,std::is_trivially_constructible<group_type>::value
|
||||
>{});
|
||||
arrays.groups()[groups_size-1].set_sentinel();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#ifndef BOOST_UNORDERED_DETAIL_FOA_NODE_HANDLE_HPP
|
||||
#define BOOST_UNORDERED_DETAIL_FOA_NODE_HANDLE_HPP
|
||||
|
||||
#include <boost/unordered/detail/opt_storage.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/allocator_access.hpp>
|
||||
|
||||
@@ -25,14 +27,6 @@ struct insert_return_type
|
||||
NodeType node;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
union opt_storage {
|
||||
BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS T t_;
|
||||
|
||||
opt_storage(){}
|
||||
~opt_storage(){}
|
||||
};
|
||||
|
||||
template <class TypePolicy,class Allocator>
|
||||
struct node_handle_base
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <boost/unordered/detail/fca.hpp>
|
||||
#include <boost/unordered/detail/fwd.hpp>
|
||||
#include <boost/unordered/detail/opt_storage.hpp>
|
||||
#include <boost/unordered/detail/serialize_tracked_address.hpp>
|
||||
#include <boost/unordered/detail/static_assert.hpp>
|
||||
#include <boost/unordered/detail/type_traits.hpp>
|
||||
@@ -31,20 +32,6 @@
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/type_traits/add_lvalue_reference.hpp>
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/type_traits/is_class.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_empty.hpp>
|
||||
#include <boost/type_traits/is_nothrow_move_assignable.hpp>
|
||||
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
|
||||
#include <boost/type_traits/is_nothrow_swappable.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/make_void.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
@@ -124,7 +111,7 @@ namespace boost {
|
||||
// iterator SFINAE
|
||||
|
||||
template <typename I>
|
||||
struct is_forward : boost::is_base_of<std::forward_iterator_tag,
|
||||
struct is_forward : std::is_base_of<std::forward_iterator_tag,
|
||||
typename std::iterator_traits<I>::iterator_category>
|
||||
{
|
||||
};
|
||||
@@ -292,8 +279,7 @@ namespace boost {
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Bits and pieces for implementing traits
|
||||
|
||||
template <typename T>
|
||||
typename boost::add_lvalue_reference<T>::type make();
|
||||
template <typename T> typename std::add_lvalue_reference<T>::type make();
|
||||
struct choice9
|
||||
{
|
||||
typedef char (&type)[9];
|
||||
@@ -385,8 +371,7 @@ namespace boost {
|
||||
{
|
||||
typedef ValueType value_type;
|
||||
|
||||
typename boost::aligned_storage<sizeof(value_type),
|
||||
boost::alignment_of<value_type>::value>::type data_;
|
||||
opt_storage<value_type> data_;
|
||||
|
||||
value_base() : data_() {}
|
||||
|
||||
@@ -865,26 +850,23 @@ namespace boost {
|
||||
{
|
||||
public:
|
||||
static const bool nothrow_move_assignable =
|
||||
boost::is_nothrow_move_assignable<H>::value &&
|
||||
boost::is_nothrow_move_assignable<P>::value;
|
||||
std::is_nothrow_move_assignable<H>::value &&
|
||||
std::is_nothrow_move_assignable<P>::value;
|
||||
static const bool nothrow_move_constructible =
|
||||
boost::is_nothrow_move_constructible<H>::value &&
|
||||
boost::is_nothrow_move_constructible<P>::value;
|
||||
std::is_nothrow_move_constructible<H>::value &&
|
||||
std::is_nothrow_move_constructible<P>::value;
|
||||
static const bool nothrow_swappable =
|
||||
boost::is_nothrow_swappable<H>::value &&
|
||||
boost::is_nothrow_swappable<P>::value;
|
||||
boost::unordered::detail::is_nothrow_swappable<H>::value &&
|
||||
boost::unordered::detail::is_nothrow_swappable<P>::value;
|
||||
|
||||
private:
|
||||
functions& operator=(functions const&);
|
||||
|
||||
typedef compressed<H, P> function_pair;
|
||||
|
||||
typedef typename boost::aligned_storage<sizeof(function_pair),
|
||||
boost::alignment_of<function_pair>::value>::type aligned_function;
|
||||
|
||||
unsigned char current_; // 0/1 - Currently active functions
|
||||
// +2 - Both constructed
|
||||
aligned_function funcs_[2];
|
||||
opt_storage<function_pair> funcs_[2];
|
||||
|
||||
public:
|
||||
functions(H const& hf, P const& eq) : current_(0)
|
||||
@@ -2138,8 +2120,8 @@ namespace boost {
|
||||
void merge_unique(boost::unordered::detail::table<Types2>& other)
|
||||
{
|
||||
typedef boost::unordered::detail::table<Types2> other_table;
|
||||
BOOST_UNORDERED_STATIC_ASSERT((
|
||||
boost::is_same<node_type, typename other_table::node_type>::value));
|
||||
BOOST_UNORDERED_STATIC_ASSERT(
|
||||
(std::is_same<node_type, typename other_table::node_type>::value));
|
||||
BOOST_ASSERT(this->node_alloc() == other.node_alloc());
|
||||
|
||||
if (other.size_ == 0) {
|
||||
@@ -2816,8 +2798,7 @@ namespace boost {
|
||||
sizeof(choice2::type)
|
||||
};
|
||||
|
||||
typedef
|
||||
typename boost::conditional<value, Key const&, no_key>::type type;
|
||||
typedef typename std::conditional<value, Key const&, no_key>::type type;
|
||||
};
|
||||
|
||||
template <class ValueType> struct set_extractor
|
||||
@@ -2846,7 +2827,7 @@ namespace boost {
|
||||
template <class ValueType> struct map_extractor
|
||||
{
|
||||
typedef ValueType value_type;
|
||||
typedef typename boost::remove_const<typename boost::unordered::detail::
|
||||
typedef typename std::remove_const<typename boost::unordered::detail::
|
||||
pair_traits<ValueType>::first_type>::type key_type;
|
||||
|
||||
static key_type const& extract(value_type const& v) { return v.first; }
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
#include <boost/unordered/detail/static_assert.hpp>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/make_unsigned.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost{
|
||||
namespace unordered{
|
||||
@@ -22,8 +21,8 @@ namespace detail{
|
||||
template<typename To,typename From>
|
||||
constexpr To narrow_cast(From x) noexcept
|
||||
{
|
||||
BOOST_UNORDERED_STATIC_ASSERT(boost::is_integral<From>::value);
|
||||
BOOST_UNORDERED_STATIC_ASSERT(boost::is_integral<To>::value);
|
||||
BOOST_UNORDERED_STATIC_ASSERT(std::is_integral<From>::value);
|
||||
BOOST_UNORDERED_STATIC_ASSERT(std::is_integral<To>::value);
|
||||
BOOST_UNORDERED_STATIC_ASSERT(sizeof(From)>=sizeof(To));
|
||||
|
||||
return static_cast<To>(
|
||||
@@ -33,7 +32,7 @@ constexpr To narrow_cast(From x) noexcept
|
||||
/* Avoids VS's "Run-Time Check Failure #1 - A cast to a smaller data type
|
||||
* has caused a loss of data."
|
||||
*/
|
||||
&static_cast<typename boost::make_unsigned<To>::type>(~static_cast<To>(0))
|
||||
&static_cast<typename std::make_unsigned<To>::type>(~static_cast<To>(0))
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef BOOST_UNORDERED_DETAIL_OPT_STORAGE_HPP
|
||||
#define BOOST_UNORDERED_DETAIL_OPT_STORAGE_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/addressof.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
namespace detail {
|
||||
template <class T> union opt_storage
|
||||
{
|
||||
BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS T t_;
|
||||
|
||||
opt_storage() {}
|
||||
~opt_storage() {}
|
||||
|
||||
T* address() noexcept { return boost::addressof(t_); }
|
||||
T const* address() const noexcept { return boost::addressof(t_); }
|
||||
};
|
||||
} // namespace detail
|
||||
} // namespace unordered
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNORDERED_DETAIL_OPT_STORAGE_HPP
|
||||
@@ -12,8 +12,6 @@
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/unordered/detail/archive_constructed.hpp>
|
||||
#include <boost/unordered/detail/bad_archive_exception.hpp>
|
||||
#include <boost/unordered/detail/serialization_version.hpp>
|
||||
@@ -109,9 +107,9 @@ template<typename Map> struct load_or_save_unordered_map<Map,true> /* save */
|
||||
template<typename Archive>
|
||||
void operator()(Archive& ar,const Map& x,unsigned int)const
|
||||
{
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename Map::key_type>::type key_type;
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename Map::mapped_type>::type mapped_type;
|
||||
typedef typename Map::const_iterator const_iterator;
|
||||
|
||||
@@ -146,9 +144,9 @@ template<typename Map> struct load_or_save_unordered_map<Map,false> /* load */
|
||||
template<typename Archive>
|
||||
void operator()(Archive& ar,Map& x,unsigned int)const
|
||||
{
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename Map::key_type>::type key_type;
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename Map::mapped_type>::type mapped_type;
|
||||
typedef typename Map::iterator iterator;
|
||||
|
||||
@@ -195,7 +193,7 @@ void serialize_container(Archive& ar,Container& x,unsigned int version)
|
||||
{
|
||||
load_or_save_container<
|
||||
Container,
|
||||
boost::is_same<
|
||||
std::is_same<
|
||||
typename Container::key_type,typename Container::value_type>::value,
|
||||
Archive::is_saving::value>()(ar,x,version);
|
||||
}
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
#ifndef BOOST_UNORDERED_DETAIL_SERIALIZE_TRACKED_ADDRESS_HPP
|
||||
#define BOOST_UNORDERED_DETAIL_SERIALIZE_TRACKED_ADDRESS_HPP
|
||||
|
||||
#include <boost/unordered/detail/bad_archive_exception.hpp>
|
||||
|
||||
#include <boost/core/pointer_traits.hpp>
|
||||
#include <boost/core/serialization.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/unordered/detail/bad_archive_exception.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost{
|
||||
namespace unordered{
|
||||
@@ -44,7 +45,7 @@ template<typename Archive,typename Ptr>
|
||||
void track_address(Archive& ar,Ptr p)
|
||||
{
|
||||
typedef typename boost::pointer_traits<Ptr> ptr_traits;
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename ptr_traits::element_type>::type element_type;
|
||||
|
||||
if(p){
|
||||
@@ -57,10 +58,10 @@ void track_address(Archive& ar,Ptr p)
|
||||
}
|
||||
|
||||
template<typename Archive,typename Ptr>
|
||||
void serialize_tracked_address(Archive& ar,Ptr& p,boost::true_type /* save */)
|
||||
void serialize_tracked_address(Archive& ar,Ptr& p,std::true_type /* save */)
|
||||
{
|
||||
typedef typename boost::pointer_traits<Ptr> ptr_traits;
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename ptr_traits::element_type>::type element_type;
|
||||
typedef serialization_tracker<element_type> tracker;
|
||||
|
||||
@@ -73,10 +74,10 @@ void serialize_tracked_address(Archive& ar,Ptr& p,boost::true_type /* save */)
|
||||
}
|
||||
|
||||
template<typename Archive,typename Ptr>
|
||||
void serialize_tracked_address(Archive& ar,Ptr& p,boost::false_type /* load */)
|
||||
void serialize_tracked_address(Archive& ar,Ptr& p,std::false_type /* load */)
|
||||
{
|
||||
typedef typename boost::pointer_traits<Ptr> ptr_traits;
|
||||
typedef typename boost::remove_const<
|
||||
typedef typename std::remove_const<
|
||||
typename ptr_traits::element_type>::type element_type;
|
||||
typedef serialization_tracker<element_type> tracker;
|
||||
|
||||
@@ -93,7 +94,7 @@ void serialize_tracked_address(Archive& ar,Ptr& p)
|
||||
{
|
||||
serialize_tracked_address(
|
||||
ar,p,
|
||||
boost::integral_constant<bool,Archive::is_saving::value>());
|
||||
std::integral_constant<bool,Archive::is_saving::value>());
|
||||
}
|
||||
|
||||
} /* namespace detail */
|
||||
|
||||
@@ -11,20 +11,13 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/make_void.hpp>
|
||||
#include <boost/type_traits/type_identity.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)
|
||||
#include <boost/type_traits/enable_if.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <iterator>
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
// BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES
|
||||
|
||||
#if !defined(BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES)
|
||||
@@ -40,19 +33,56 @@
|
||||
namespace boost {
|
||||
namespace unordered {
|
||||
namespace detail {
|
||||
|
||||
template <class T> struct type_identity
|
||||
{
|
||||
using type = T;
|
||||
};
|
||||
|
||||
template <typename... Ts> struct make_void
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <typename... Ts> using void_t = typename make_void<Ts...>::type;
|
||||
|
||||
namespace type_traits_detail {
|
||||
using std::swap;
|
||||
|
||||
template <class T, class = void> struct is_nothrow_swappable_helper
|
||||
{
|
||||
constexpr static bool const value = false;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_nothrow_swappable_helper<T,
|
||||
void_t<decltype(swap(std::declval<T&>(), std::declval<T&>()))> >
|
||||
{
|
||||
constexpr static bool const value =
|
||||
noexcept(swap(std::declval<T&>(), std::declval<T&>()));
|
||||
};
|
||||
|
||||
} // namespace type_traits_detail
|
||||
|
||||
template <class T> struct is_nothrow_swappable
|
||||
{
|
||||
constexpr static bool const value =
|
||||
type_traits_detail::is_nothrow_swappable_helper<T>::value;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Type checkers used for the transparent member functions added by C++20
|
||||
// and up
|
||||
|
||||
template <class, class = void>
|
||||
struct is_transparent : public boost::false_type
|
||||
struct is_transparent : public std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_transparent<T,
|
||||
typename boost::make_void<typename T::is_transparent>::type>
|
||||
: public boost::true_type
|
||||
typename boost::unordered::detail::make_void<typename T::is_transparent>::type>
|
||||
: public std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
@@ -71,8 +101,8 @@ namespace boost {
|
||||
|
||||
static bool const value =
|
||||
are_transparent<Key, hash, key_equal>::value &&
|
||||
!boost::is_convertible<Key, iterator>::value &&
|
||||
!boost::is_convertible<Key, const_iterator>::value;
|
||||
!std::is_convertible<Key, iterator>::value &&
|
||||
!std::is_convertible<Key, const_iterator>::value;
|
||||
};
|
||||
|
||||
#if BOOST_UNORDERED_TEMPLATE_DEDUCTION_GUIDES
|
||||
@@ -81,7 +111,7 @@ namespace boost {
|
||||
|
||||
template <class InputIterator>
|
||||
constexpr bool const is_input_iterator_v =
|
||||
!boost::is_integral<InputIterator>::value;
|
||||
!std::is_integral<InputIterator>::value;
|
||||
|
||||
template <class A, class = void> struct is_allocator
|
||||
{
|
||||
@@ -90,7 +120,7 @@ namespace boost {
|
||||
|
||||
template <class A>
|
||||
struct is_allocator<A,
|
||||
boost::void_t<typename A::value_type,
|
||||
boost::unordered::detail::void_t<typename A::value_type,
|
||||
decltype(std::declval<A&>().allocate(std::size_t{}))> >
|
||||
{
|
||||
constexpr static bool const value = true;
|
||||
@@ -101,7 +131,7 @@ namespace boost {
|
||||
|
||||
template <class H>
|
||||
constexpr bool const is_hash_v =
|
||||
!boost::is_integral<H>::value && !is_allocator_v<H>;
|
||||
!std::is_integral<H>::value && !is_allocator_v<H>;
|
||||
|
||||
template <class P> constexpr bool const is_pred_v = !is_allocator_v<P>;
|
||||
|
||||
@@ -116,7 +146,7 @@ namespace boost {
|
||||
typename std::pair<iter_key_t<T> const, iter_val_t<T> >;
|
||||
#endif
|
||||
} // namespace detail
|
||||
} // namespace unordered
|
||||
} // namespace unordered
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNORDERED_DETAIL_TYPE_TRAITS_HPP
|
||||
|
||||
Reference in New Issue
Block a user