Remove BOOST_NO_CXX11_HDR_INITIALIZER_LIST checks

This commit is contained in:
Christian Mazakas
2023-08-28 15:21:43 -07:00
parent b0ee2b5116
commit 8cbd9ad80a
6 changed files with 6 additions and 136 deletions

View File

@@ -24,9 +24,7 @@
#include <boost/move/move.hpp>
#include <boost/type_traits/is_constructible.hpp>
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include <initializer_list>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
@@ -115,12 +113,10 @@ namespace boost {
unordered_map(BOOST_RV_REF(unordered_map), allocator_type const&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_map(std::initializer_list<value_type>,
size_type = boost::unordered::detail::default_bucket_count,
const hasher& = hasher(), const key_equal& l = key_equal(),
const allocator_type& = allocator_type());
#endif
explicit unordered_map(size_type, const allocator_type&);
@@ -136,7 +132,6 @@ namespace boost {
unordered_map(
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_map(std::initializer_list<value_type>, const allocator_type&);
unordered_map(
@@ -144,7 +139,6 @@ namespace boost {
unordered_map(std::initializer_list<value_type>, size_type, const hasher&,
const allocator_type&);
#endif
// Destructor
@@ -186,9 +180,7 @@ namespace boost {
#endif
#endif
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_map& operator=(std::initializer_list<value_type>);
#endif
allocator_type get_allocator() const noexcept
{
@@ -423,9 +415,7 @@ namespace boost {
template <class InputIt> void insert(InputIt, InputIt);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void insert(std::initializer_list<value_type>);
#endif
// extract
@@ -584,7 +574,7 @@ namespace boost {
{
return table_.try_emplace_unique(
std::move(k), boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0)));
boost::forward<A0>(a0)));
}
template <typename A0, typename A1>
@@ -593,7 +583,7 @@ namespace boost {
{
return table_.try_emplace_unique(
std::move(k), boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0), boost::forward<A1>(a1)));
boost::forward<A0>(a0), boost::forward<A1>(a1)));
}
template <typename A0, typename A1, typename A2>
@@ -753,9 +743,9 @@ namespace boost {
std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
{ \
return table_.try_emplace_unique(std::move(k), \
boost::unordered::detail::create_emplace_args( \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
return table_.try_emplace_unique( \
std::move(k), boost::unordered::detail::create_emplace_args( \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
} \
\
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
@@ -771,7 +761,7 @@ namespace boost {
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
{ \
return table_.try_emplace_hint_unique(hint, std::move(k), \
return table_.try_emplace_hint_unique(hint, std::move(k), \
boost::unordered::detail::create_emplace_args( \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
}
@@ -1222,12 +1212,10 @@ namespace boost {
unordered_multimap(
BOOST_RV_REF(unordered_multimap), allocator_type const&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_multimap(std::initializer_list<value_type>,
size_type = boost::unordered::detail::default_bucket_count,
const hasher& = hasher(), const key_equal& l = key_equal(),
const allocator_type& = allocator_type());
#endif
explicit unordered_multimap(size_type, const allocator_type&);
@@ -1244,7 +1232,6 @@ namespace boost {
unordered_multimap(
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_multimap(
std::initializer_list<value_type>, const allocator_type&);
@@ -1253,7 +1240,6 @@ namespace boost {
unordered_multimap(std::initializer_list<value_type>, size_type,
const hasher&, const allocator_type&);
#endif
// Destructor
@@ -1295,9 +1281,7 @@ namespace boost {
#endif
#endif
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_multimap& operator=(std::initializer_list<value_type>);
#endif
allocator_type get_allocator() const noexcept
{
@@ -1525,9 +1509,7 @@ namespace boost {
template <class InputIt> void insert(InputIt, InputIt);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void insert(std::initializer_list<value_type>);
#endif
// extract
@@ -1917,8 +1899,6 @@ namespace boost {
table_.move_construct_buckets(other.table_);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
unordered_map<K, T, H, P, A>::unordered_map(
std::initializer_list<value_type> list, size_type n, const hasher& hf,
@@ -1930,8 +1910,6 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class K, class T, class H, class P, class A>
unordered_map<K, T, H, P, A>::unordered_map(
size_type n, const allocator_type& a)
@@ -1977,8 +1955,6 @@ namespace boost {
this->insert(f, l);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
unordered_map<K, T, H, P, A>::unordered_map(
std::initializer_list<value_type> list, const allocator_type& a)
@@ -2011,15 +1987,11 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class K, class T, class H, class P, class A>
unordered_map<K, T, H, P, A>::~unordered_map() noexcept
{
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
unordered_map<K, T, H, P, A>& unordered_map<K, T, H, P, A>::operator=(
std::initializer_list<value_type> list)
@@ -2029,8 +2001,6 @@ namespace boost {
return *this;
}
#endif
// size and capacity
template <class K, class T, class H, class P, class A>
@@ -2057,14 +2027,12 @@ namespace boost {
}
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
void unordered_map<K, T, H, P, A>::insert(
std::initializer_list<value_type> list)
{
this->insert(list.begin(), list.end());
}
#endif
template <class K, class T, class H, class P, class A>
typename unordered_map<K, T, H, P, A>::iterator
@@ -2465,8 +2433,6 @@ namespace boost {
table_.move_construct_buckets(other.table_);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
unordered_multimap<K, T, H, P, A>::unordered_multimap(
std::initializer_list<value_type> list, size_type n, const hasher& hf,
@@ -2478,8 +2444,6 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class K, class T, class H, class P, class A>
unordered_multimap<K, T, H, P, A>::unordered_multimap(
size_type n, const allocator_type& a)
@@ -2525,8 +2489,6 @@ namespace boost {
this->insert(f, l);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
unordered_multimap<K, T, H, P, A>::unordered_multimap(
std::initializer_list<value_type> list, const allocator_type& a)
@@ -2559,15 +2521,11 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class K, class T, class H, class P, class A>
unordered_multimap<K, T, H, P, A>::~unordered_multimap() noexcept
{
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
unordered_multimap<K, T, H, P, A>&
unordered_multimap<K, T, H, P, A>::operator=(
@@ -2578,8 +2536,6 @@ namespace boost {
return *this;
}
#endif
// size and capacity
template <class K, class T, class H, class P, class A>
@@ -2603,14 +2559,12 @@ namespace boost {
table_.insert_range_equiv(first, last);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class K, class T, class H, class P, class A>
void unordered_multimap<K, T, H, P, A>::insert(
std::initializer_list<value_type> list)
{
this->insert(list.begin(), list.end());
}
#endif
template <class K, class T, class H, class P, class A>
typename unordered_multimap<K, T, H, P, A>::iterator

View File

@@ -23,9 +23,7 @@
#include <boost/functional/hash.hpp>
#include <boost/move/move.hpp>
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
#include <initializer_list>
#endif
#if defined(BOOST_MSVC)
#pragma warning(push)
@@ -113,12 +111,10 @@ namespace boost {
unordered_set(BOOST_RV_REF(unordered_set), allocator_type const&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_set(std::initializer_list<value_type>,
size_type = boost::unordered::detail::default_bucket_count,
const hasher& = hasher(), const key_equal& l = key_equal(),
const allocator_type& = allocator_type());
#endif
explicit unordered_set(size_type, const allocator_type&);
@@ -134,7 +130,6 @@ namespace boost {
unordered_set(
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_set(std::initializer_list<value_type>, const allocator_type&);
unordered_set(
@@ -142,7 +137,6 @@ namespace boost {
unordered_set(std::initializer_list<value_type>, size_type, const hasher&,
const allocator_type&);
#endif
// Destructor
@@ -184,9 +178,7 @@ namespace boost {
#endif
#endif
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_set& operator=(std::initializer_list<value_type>);
#endif
allocator_type get_allocator() const noexcept
{
@@ -422,9 +414,7 @@ namespace boost {
template <class InputIt> void insert(InputIt, InputIt);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void insert(std::initializer_list<value_type>);
#endif
// extract
@@ -794,12 +784,10 @@ namespace boost {
unordered_multiset(
BOOST_RV_REF(unordered_multiset), allocator_type const&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_multiset(std::initializer_list<value_type>,
size_type = boost::unordered::detail::default_bucket_count,
const hasher& = hasher(), const key_equal& l = key_equal(),
const allocator_type& = allocator_type());
#endif
explicit unordered_multiset(size_type, const allocator_type&);
@@ -816,7 +804,6 @@ namespace boost {
unordered_multiset(
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_multiset(
std::initializer_list<value_type>, const allocator_type&);
@@ -825,7 +812,6 @@ namespace boost {
unordered_multiset(std::initializer_list<value_type>, size_type,
const hasher&, const allocator_type&);
#endif
// Destructor
@@ -867,9 +853,7 @@ namespace boost {
#endif
#endif
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
unordered_multiset& operator=(std::initializer_list<value_type>);
#endif
allocator_type get_allocator() const noexcept
{
@@ -1081,9 +1065,7 @@ namespace boost {
template <class InputIt> void insert(InputIt, InputIt);
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
void insert(std::initializer_list<value_type>);
#endif
// extract
@@ -1438,8 +1420,6 @@ namespace boost {
table_.move_construct_buckets(other.table_);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
unordered_set<T, H, P, A>::unordered_set(
std::initializer_list<value_type> list, size_type n, const hasher& hf,
@@ -1451,8 +1431,6 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class T, class H, class P, class A>
unordered_set<T, H, P, A>::unordered_set(
size_type n, const allocator_type& a)
@@ -1498,8 +1476,6 @@ namespace boost {
this->insert(f, l);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
unordered_set<T, H, P, A>::unordered_set(
std::initializer_list<value_type> list, const allocator_type& a)
@@ -1532,15 +1508,11 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class T, class H, class P, class A>
unordered_set<T, H, P, A>::~unordered_set() noexcept
{
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
unordered_set<T, H, P, A>& unordered_set<T, H, P, A>::operator=(
std::initializer_list<value_type> list)
@@ -1550,8 +1522,6 @@ namespace boost {
return *this;
}
#endif
// size and capacity
template <class T, class H, class P, class A>
@@ -1578,14 +1548,12 @@ namespace boost {
}
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
void unordered_set<T, H, P, A>::insert(
std::initializer_list<value_type> list)
{
this->insert(list.begin(), list.end());
}
#endif
template <class T, class H, class P, class A>
typename unordered_set<T, H, P, A>::iterator
@@ -1856,8 +1824,6 @@ namespace boost {
table_.move_construct_buckets(other.table_);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
unordered_multiset<T, H, P, A>::unordered_multiset(
std::initializer_list<value_type> list, size_type n, const hasher& hf,
@@ -1869,8 +1835,6 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class T, class H, class P, class A>
unordered_multiset<T, H, P, A>::unordered_multiset(
size_type n, const allocator_type& a)
@@ -1916,8 +1880,6 @@ namespace boost {
this->insert(f, l);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
unordered_multiset<T, H, P, A>::unordered_multiset(
std::initializer_list<value_type> list, const allocator_type& a)
@@ -1950,15 +1912,11 @@ namespace boost {
this->insert(list.begin(), list.end());
}
#endif
template <class T, class H, class P, class A>
unordered_multiset<T, H, P, A>::~unordered_multiset() noexcept
{
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
unordered_multiset<T, H, P, A>& unordered_multiset<T, H, P, A>::operator=(
std::initializer_list<value_type> list)
@@ -1968,8 +1926,6 @@ namespace boost {
return *this;
}
#endif
// size and capacity
template <class T, class H, class P, class A>
@@ -1993,14 +1949,12 @@ namespace boost {
table_.insert_range_equiv(first, last);
}
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
template <class T, class H, class P, class A>
void unordered_multiset<T, H, P, A>::insert(
std::initializer_list<value_type> list)
{
this->insert(list.begin(), list.end());
}
#endif
template <class T, class H, class P, class A>
typename unordered_multiset<T, H, P, A>::iterator