mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
added CTAD docs (#167)
* added CTAD docs for unordered_map * added CTAD docs for unordered_multimap * added CTAD docs for unordered_set * s/Deduction guides/Deduction Guides * added CTAD docs for unordered_multiset * added CTAD docs for unordered_flat_map * added CTAD docs for unordered_flat_set
This commit is contained in:
@ -205,26 +205,76 @@ namespace boost {
|
||||
void xref:#unordered_flat_map_rehash[rehash](size_type n);
|
||||
void xref:#unordered_flat_map_reserve[reserve](size_type n);
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
template<class InputIterator,
|
||||
class Hash = boost::hash<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
class Pred = std::equal_to<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
class Allocator = std::allocator<xref:#unordered_flat_map_iter_to_alloc_type[__iter-to-alloc-type__]<InputIterator>>>
|
||||
unordered_flat_map(InputIterator, InputIterator, typename xref:#unordered_flat_map_deduction_guides[__see below__]::size_type = xref:#unordered_flat_map_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_flat_map<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_flat_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>, Hash,
|
||||
Pred, Allocator>;
|
||||
|
||||
template<class Key, class T, class Hash = boost::hash<Key>,
|
||||
class Pred = std::equal_to<Key>,
|
||||
class Allocator = std::allocator<std::pair<const Key, T>>>
|
||||
unordered_flat_map(std::initializer_list<std::pair<Key, T>>,
|
||||
typename xref:#unordered_flat_map_deduction_guides[__see below__]::size_type = xref:#unordered_flat_map_deduction_guides[__see below__], Hash = Hash(),
|
||||
Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_flat_map<Key, T, Hash, Pred, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_flat_map(InputIterator, InputIterator, typename xref:#unordered_flat_map_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_flat_map<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_flat_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_flat_map(InputIterator, InputIterator, Allocator)
|
||||
-> unordered_flat_map<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_flat_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Hash, class Allocator>
|
||||
unordered_flat_map(InputIterator, InputIterator, typename xref:#unordered_flat_map_deduction_guides[__see below__]::size_type, Hash,
|
||||
Allocator)
|
||||
-> unordered_flat_map<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_flat_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>, Hash,
|
||||
std::equal_to<xref:#unordered_flat_map_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Allocator>
|
||||
unordered_flat_map(std::initializer_list<std::pair<Key, T>>, typename xref:#unordered_flat_map_deduction_guides[__see below__]::size_type,
|
||||
Allocator)
|
||||
-> unordered_flat_map<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Allocator>
|
||||
unordered_flat_map(std::initializer_list<std::pair<Key, T>>, Allocator)
|
||||
-> unordered_flat_map<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Hash, class Allocator>
|
||||
unordered_flat_map(std::initializer_list<std::pair<Key, T>>, typename xref:#unordered_flat_map_deduction_guides[__see below__]::size_type,
|
||||
Hash, Allocator)
|
||||
-> unordered_flat_map<Key, T, Hash, std::equal_to<Key>, Allocator>;
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_map_operator_2[operator==](const unordered_flat_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_map_operator_3[operator!=](const unordered_flat_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_flat_map_swap_2[swap](unordered_flat_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_flat_map<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_flat_map<K, T, H, P, A>::size_type
|
||||
xref:#unordered_flat_map_erase_if[erase_if](unordered_flat_map<K, T, H, P, A>& c, Predicate pred);
|
||||
}
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_map_operator_2[operator==](const unordered_flat_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_map_operator_3[operator!=](const unordered_flat_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_flat_map_swap_2[swap](unordered_flat_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_flat_map<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_flat_map<K, T, H, P, A>::size_type
|
||||
xref:#unordered_flat_map_erase_if[erase_if](unordered_flat_map<K, T, H, P, A>& c, Predicate pred);
|
||||
-----
|
||||
|
||||
---
|
||||
@ -1237,6 +1287,51 @@ Invalidates iterators, pointers and references, and changes the order of element
|
||||
[horizontal]
|
||||
Throws:;; The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
- It has an `InputIterator` template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
|
||||
- It has an `Allocator` template parameter and a type that does not qualify as an allocator is deduced for that parameter.
|
||||
- It has a `Hash` template parameter and an integral type or a type that qualifies as an allocator is deduced for that parameter.
|
||||
- It has a `Pred` template parameter and a type that qualifies as an allocator is deduced for that parameter.
|
||||
|
||||
A `size_type` parameter type in a deduction guide refers to the `size_type` member type of the
|
||||
container type deduced by the deduction guide. Its default value coincides with the default value
|
||||
of the constructor selected.
|
||||
|
||||
==== __iter-value-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-value-type__ =
|
||||
typename std::iterator_traits<InputIterator>::value_type; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-key-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-key-type__ = std::remove_const_t<
|
||||
std::tuple_element_t<0, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-mapped-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-mapped-type__ =
|
||||
std::tuple_element_t<1, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-to-alloc-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-to-alloc-type__ = std::pair<
|
||||
std::add_const_t<std::tuple_element_t<0, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>,
|
||||
std::tuple_element_t<1, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>; // exposition only
|
||||
-----
|
||||
|
||||
=== Equality Comparisons
|
||||
|
||||
==== operator==
|
||||
|
@ -173,26 +173,71 @@ namespace boost {
|
||||
void xref:#unordered_flat_set_rehash[rehash](size_type n);
|
||||
void xref:#unordered_flat_set_reserve[reserve](size_type n);
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
template<class InputIterator,
|
||||
class Hash = boost::hash<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
class Pred = std::equal_to<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
class Allocator = std::allocator<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>>
|
||||
unordered_flat_set(InputIterator, InputIterator, typename xref:#unordered_flat_set_deduction_guides[__see below__]::size_type = xref:#unordered_flat_set_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_flat_set<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>, Hash, Pred, Allocator>;
|
||||
|
||||
template<class T, class Hash = boost::hash<T>, class Pred = std::equal_to<T>,
|
||||
class Allocator = std::allocator<T>>
|
||||
unordered_flat_set(std::initializer_list<T>, typename xref:#unordered_flat_set_deduction_guides[__see below__]::size_type = xref:#unordered_flat_set_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_flat_set<T, Hash, Pred, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_flat_set(InputIterator, InputIterator, typename xref:#unordered_flat_set_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_flat_set<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_flat_set(InputIterator, InputIterator, Allocator)
|
||||
-> unordered_flat_set<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Hash, class Allocator>
|
||||
unordered_flat_set(InputIterator, InputIterator, typename xref:#unordered_flat_set_deduction_guides[__see below__]::size_type, Hash,
|
||||
Allocator)
|
||||
-> unordered_flat_set<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>, Hash,
|
||||
std::equal_to<xref:#unordered_flat_set_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class T, class Allocator>
|
||||
unordered_flat_set(std::initializer_list<T>, typename xref:#unordered_flat_set_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_flat_set<T, boost::hash<T>, std::equal_to<T>, Allocator>;
|
||||
|
||||
template<class T, class Allocator>
|
||||
unordered_flat_set(std::initializer_list<T>, Allocator)
|
||||
-> unordered_flat_set<T, boost::hash<T>, std::equal_to<T>, Allocator>;
|
||||
|
||||
template<class T, class Hash, class Allocator>
|
||||
unordered_flat_set(std::initializer_list<T>, typename xref:#unordered_flat_set_deduction_guides[__see below__]::size_type, Hash, Allocator)
|
||||
-> unordered_flat_set<T, Hash, std::equal_to<T>, Allocator>;
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_set_operator_2[operator==](const unordered_flat_set<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_set<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_set_operator_3[operator!=](const unordered_flat_set<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_set<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_flat_set_swap_2[swap](unordered_flat_set<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_flat_set<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_flat_set<K, T, H, P, A>::size_type
|
||||
xref:#unordered_flat_set_erase_if[erase_if](unordered_flat_set<K, T, H, P, A>& c, Predicate pred);
|
||||
}
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_set_operator_2[operator==](const unordered_flat_set<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_set<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_flat_set_operator_3[operator!=](const unordered_flat_set<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_flat_set<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_flat_set_swap_2[swap](unordered_flat_set<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_flat_set<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_flat_set<K, T, H, P, A>::size_type
|
||||
xref:#unordered_flat_set_erase_if[erase_if](unordered_flat_set<K, T, H, P, A>& c, Predicate pred);
|
||||
-----
|
||||
|
||||
---
|
||||
@ -1036,6 +1081,26 @@ Invalidates iterators, pointers and references, and changes the order of element
|
||||
[horizontal]
|
||||
Throws:;; The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
- It has an `InputIterator` template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
|
||||
- It has an `Allocator` template parameter and a type that does not qualify as an allocator is deduced for that parameter.
|
||||
- It has a `Hash` template parameter and an integral type or a type that qualifies as an allocator is deduced for that parameter.
|
||||
- It has a `Pred` template parameter and a type that qualifies as an allocator is deduced for that parameter.
|
||||
|
||||
A `size_type` parameter type in a deduction guide refers to the `size_type` member type of the
|
||||
container type deduced by the deduction guide. Its default value coincides with the default value
|
||||
of the constructor selected.
|
||||
|
||||
==== __iter-value-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-value-type__ =
|
||||
typename std::iterator_traits<InputIterator>::value_type; // exposition only
|
||||
-----
|
||||
|
||||
=== Equality Comparisons
|
||||
|
||||
==== operator==
|
||||
|
@ -209,26 +209,75 @@ namespace boost {
|
||||
void xref:#unordered_map_rehash[rehash](size_type n);
|
||||
void xref:#unordered_map_reserve[reserve](size_type n);
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
template<class InputIterator,
|
||||
class Hash = boost::hash<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
class Pred = std::equal_to<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
class Allocator = std::allocator<xref:#unordered_map_iter_to_alloc_type[__iter-to-alloc-type__]<InputIterator>>>
|
||||
unordered_map(InputIterator, InputIterator, typename xref:#unordered_map_deduction_guides[__see below__]::size_type = xref:#unordered_map_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_map<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>, Hash, Pred,
|
||||
Allocator>;
|
||||
|
||||
template<class Key, class T, class Hash = boost::hash<Key>,
|
||||
class Pred = std::equal_to<Key>,
|
||||
class Allocator = std::allocator<std::pair<const Key, T>>>
|
||||
unordered_map(std::initializer_list<std::pair<Key, T>>,
|
||||
typename xref:#unordered_map_deduction_guides[__see below__]::size_type = xref:#unordered_map_deduction_guides[__see below__], Hash = Hash(),
|
||||
Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_map<Key, T, Hash, Pred, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_map(InputIterator, InputIterator, typename xref:#unordered_map_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_map<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_map(InputIterator, InputIterator, Allocator)
|
||||
-> unordered_map<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Hash, class Allocator>
|
||||
unordered_map(InputIterator, InputIterator, typename xref:#unordered_map_deduction_guides[__see below__]::size_type, Hash, Allocator)
|
||||
-> unordered_map<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_map_iter_mapped_type[__iter-mapped-type__]<InputIterator>, Hash,
|
||||
std::equal_to<xref:#unordered_map_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Allocator>
|
||||
unordered_map(std::initializer_list<std::pair<Key, T>>, typename xref:#unordered_map_deduction_guides[__see below__]::size_type,
|
||||
Allocator)
|
||||
-> unordered_map<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Allocator>
|
||||
unordered_map(std::initializer_list<std::pair<Key, T>>, Allocator)
|
||||
-> unordered_map<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Hash, class Allocator>
|
||||
unordered_map(std::initializer_list<std::pair<Key, T>>, typename xref:#unordered_map_deduction_guides[__see below__]::size_type, Hash,
|
||||
Allocator)
|
||||
-> unordered_map<Key, T, Hash, std::equal_to<Key>, Allocator>;
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_map_operator_2[operator==](const unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_map_operator_3[operator!=](const unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_map_swap_2[swap](unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_map<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_map<K, T, H, P, A>::size_type
|
||||
xref:#unordered_map_erase_if[erase_if](unordered_map<K, T, H, P, A>& c, Predicate pred);
|
||||
}
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_map_operator_2[operator==](const unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_map_operator_3[operator!=](const unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_map<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_map_swap_2[swap](unordered_map<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_map<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_map<K, T, H, P, A>::size_type
|
||||
xref:#unordered_map_erase_if[erase_if](unordered_map<K, T, H, P, A>& c, Predicate pred);
|
||||
-----
|
||||
|
||||
---
|
||||
@ -1620,6 +1669,51 @@ Invalidates iterators, and changes the order of elements. Pointers and reference
|
||||
[horizontal]
|
||||
Throws:;; The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
- It has an `InputIterator` template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
|
||||
- It has an `Allocator` template parameter and a type that does not qualify as an allocator is deduced for that parameter.
|
||||
- It has a `Hash` template parameter and an integral type or a type that qualifies as an allocator is deduced for that parameter.
|
||||
- It has a `Pred` template parameter and a type that qualifies as an allocator is deduced for that parameter.
|
||||
|
||||
A `size_type` parameter type in a deduction guide refers to the `size_type` member type of the
|
||||
container type deduced by the deduction guide. Its default value coincides with the default value
|
||||
of the constructor selected.
|
||||
|
||||
==== __iter-value-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-value-type__ =
|
||||
typename std::iterator_traits<InputIterator>::value_type; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-key-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-key-type__ = std::remove_const_t<
|
||||
std::tuple_element_t<0, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-mapped-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-mapped-type__ =
|
||||
std::tuple_element_t<1, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-to-alloc-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-to-alloc-type__ = std::pair<
|
||||
std::add_const_t<std::tuple_element_t<0, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>,
|
||||
std::tuple_element_t<1, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>; // exposition only
|
||||
-----
|
||||
|
||||
=== Equality Comparisons
|
||||
|
||||
==== operator==
|
||||
|
@ -186,27 +186,76 @@ namespace boost {
|
||||
void xref:#unordered_multimap_rehash[rehash](size_type n);
|
||||
void xref:#unordered_multimap_reserve[reserve](size_type n);
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
template<class InputIterator,
|
||||
class Hash = boost::hash<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
class Pred = std::equal_to<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
class Allocator = std::allocator<xref:#unordered_multimap_iter_to_alloc_type[__iter-to-alloc-type__]<InputIterator>>>
|
||||
unordered_multimap(InputIterator, InputIterator, typename xref:#unordered_multimap_deduction_guides[__see below__]::size_type = xref:#unordered_multimap_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_multimap<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_multimap_iter_mapped_type[__iter-mapped-type__]<InputIterator>, Hash,
|
||||
Pred, Allocator>;
|
||||
|
||||
template<class Key, class T, class Hash = boost::hash<Key>,
|
||||
class Pred = std::equal_to<Key>,
|
||||
class Allocator = std::allocator<std::pair<const Key, T>>>
|
||||
unordered_multimap(std::initializer_list<std::pair<Key, T>>,
|
||||
typename xref:#unordered_multimap_deduction_guides[__see below__]::size_type = xref:#unordered_multimap_deduction_guides[__see below__], Hash = Hash(),
|
||||
Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_multimap<Key, T, Hash, Pred, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_multimap(InputIterator, InputIterator, typename xref:#unordered_multimap_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_multimap<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_multimap_iter_mapped_type[__iter-mapped-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_multimap(InputIterator, InputIterator, Allocator)
|
||||
-> unordered_multimap<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_multimap_iter_mapped_type[__iter-mapped-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Hash, class Allocator>
|
||||
unordered_multimap(InputIterator, InputIterator, typename xref:#unordered_multimap_deduction_guides[__see below__]::size_type, Hash,
|
||||
Allocator)
|
||||
-> unordered_multimap<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>, xref:#unordered_multimap_iter_mapped_type[__iter-mapped-type__]<InputIterator>, Hash,
|
||||
std::equal_to<xref:#unordered_multimap_iter_key_type[__iter-key-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Allocator>
|
||||
unordered_multimap(std::initializer_list<std::pair<Key, T>>, typename xref:#unordered_multimap_deduction_guides[__see below__]::size_type,
|
||||
Allocator)
|
||||
-> unordered_multimap<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Allocator>
|
||||
unordered_multimap(std::initializer_list<std::pair<Key, T>>, Allocator)
|
||||
-> unordered_multimap<Key, T, boost::hash<Key>, std::equal_to<Key>, Allocator>;
|
||||
|
||||
template<class Key, class T, class Hash, class Allocator>
|
||||
unordered_multimap(std::initializer_list<std::pair<Key, T>>, typename xref:#unordered_multimap_deduction_guides[__see below__]::size_type,
|
||||
Hash, Allocator)
|
||||
-> unordered_multimap<Key, T, Hash, std::equal_to<Key>, Allocator>;
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multimap_operator[operator++==++](const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multimap_operator_2[operator!=](const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_multimap_swap_2[swap](unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_multimap<K, T, H, P, A>::size_type
|
||||
xref:#unordered_multimap_erase_if[erase_if](unordered_multimap<K, T, H, P, A>& c, Predicate pred);
|
||||
}
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multimap_operator[operator++==++](const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multimap_operator_2[operator!=](const unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
||||
const unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class T, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_multimap_swap_2[swap](unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
|
||||
unordered_multimap<Key, T, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class T, class H, class P, class A, class Predicate>
|
||||
typename unordered_multimap<K, T, H, P, A>::size_type
|
||||
xref:#unordered_multimap_erase_if[erase_if](unordered_multimap<K, T, H, P, A>& c, Predicate pred);
|
||||
|
||||
-----
|
||||
|
||||
---
|
||||
@ -1402,6 +1451,51 @@ Throws:;; The function has no effect if an exception is thrown, unless it is thr
|
||||
|
||||
---
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
- It has an `InputIterator` template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
|
||||
- It has an `Allocator` template parameter and a type that does not qualify as an allocator is deduced for that parameter.
|
||||
- It has a `Hash` template parameter and an integral type or a type that qualifies as an allocator is deduced for that parameter.
|
||||
- It has a `Pred` template parameter and a type that qualifies as an allocator is deduced for that parameter.
|
||||
|
||||
A `size_type` parameter type in a deduction guide refers to the `size_type` member type of the
|
||||
container type deduced by the deduction guide. Its default value coincides with the default value
|
||||
of the constructor selected.
|
||||
|
||||
==== __iter-value-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-value-type__ =
|
||||
typename std::iterator_traits<InputIterator>::value_type; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-key-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-key-type__ = std::remove_const_t<
|
||||
std::tuple_element_t<0, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-mapped-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-mapped-type__ =
|
||||
std::tuple_element_t<1, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>; // exposition only
|
||||
-----
|
||||
|
||||
==== __iter-to-alloc-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-to-alloc-type__ = std::pair<
|
||||
std::add_const_t<std::tuple_element_t<0, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>,
|
||||
std::tuple_element_t<1, xref:#unordered_map_iter_value_type[__iter-value-type__]<InputIterator>>>; // exposition only
|
||||
-----
|
||||
|
||||
=== Equality Comparisons
|
||||
|
||||
==== operator==
|
||||
|
@ -182,26 +182,71 @@ namespace boost {
|
||||
void xref:#unordered_multiset_rehash[rehash](size_type n);
|
||||
void xref:#unordered_multiset_reserve[reserve](size_type n);
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
template<class InputIterator,
|
||||
class Hash = boost::hash<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
class Pred = std::equal_to<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
class Allocator = std::allocator<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>>
|
||||
unordered_multiset(InputIterator, InputIterator, typename xref:#unordered_multiset_deduction_guides[__see below__]::size_type = xref:#unordered_multiset_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_multiset<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>, Hash, Pred, Allocator>;
|
||||
|
||||
template<class T, class Hash = boost::hash<T>, class Pred = std::equal_to<T>,
|
||||
class Allocator = std::allocator<T>>
|
||||
unordered_multiset(std::initializer_list<T>, typename xref:#unordered_multiset_deduction_guides[__see below__]::size_type = xref:#unordered_multiset_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_multiset<T, Hash, Pred, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_multiset(InputIterator, InputIterator, typename xref:#unordered_multiset_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_multiset<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_multiset(InputIterator, InputIterator, Allocator)
|
||||
-> unordered_multiset<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Hash, class Allocator>
|
||||
unordered_multiset(InputIterator, InputIterator, typename xref:#unordered_multiset_deduction_guides[__see below__]::size_type, Hash,
|
||||
Allocator)
|
||||
-> unordered_multiset<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>, Hash,
|
||||
std::equal_to<xref:#unordered_multiset_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class T, class Allocator>
|
||||
unordered_multiset(std::initializer_list<T>, typename xref:#unordered_multiset_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_multiset<T, boost::hash<T>, std::equal_to<T>, Allocator>;
|
||||
|
||||
template<class T, class Allocator>
|
||||
unordered_multiset(std::initializer_list<T>, Allocator)
|
||||
-> unordered_multiset<T, boost::hash<T>, std::equal_to<T>, Allocator>;
|
||||
|
||||
template<class T, class Hash, class Allocator>
|
||||
unordered_multiset(std::initializer_list<T>, typename xref:#unordered_multiset_deduction_guides[__see below__]::size_type, Hash, Allocator)
|
||||
-> unordered_multiset<T, Hash, std::equal_to<T>, Allocator>;
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multiset_operator[operator++==++](const unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_multiset<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multiset_operator_2[operator!=](const unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_multiset<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_multiset_swap_2[swap](unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
||||
unordered_multiset<Key, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class H, class P, class A, class Predicate>
|
||||
typename unordered_multiset<K, H, P, A>::size_type
|
||||
xref:#unordered_multiset_erase_if[erase_if](unordered_multiset<K, H, P, A>& c, Predicate pred);
|
||||
}
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multiset_operator[operator++==++](const unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_multiset<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_multiset_operator_2[operator!=](const unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_multiset<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_multiset_swap_2[swap](unordered_multiset<Key, Hash, Pred, Alloc>& x,
|
||||
unordered_multiset<Key, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class H, class P, class A, class Predicate>
|
||||
typename unordered_multiset<K, H, P, A>::size_type
|
||||
xref:#unordered_multiset_erase_if[erase_if](unordered_multiset<K, H, P, A>& c, Predicate pred);
|
||||
-----
|
||||
|
||||
---
|
||||
@ -1364,6 +1409,26 @@ Throws:;; The function has no effect if an exception is thrown, unless it is thr
|
||||
|
||||
---
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
- It has an `InputIterator` template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
|
||||
- It has an `Allocator` template parameter and a type that does not qualify as an allocator is deduced for that parameter.
|
||||
- It has a `Hash` template parameter and an integral type or a type that qualifies as an allocator is deduced for that parameter.
|
||||
- It has a `Pred` template parameter and a type that qualifies as an allocator is deduced for that parameter.
|
||||
|
||||
A `size_type` parameter type in a deduction guide refers to the `size_type` member type of the
|
||||
container type deduced by the deduction guide. Its default value coincides with the default value
|
||||
of the constructor selected.
|
||||
|
||||
==== __iter-value-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-value-type__ =
|
||||
typename std::iterator_traits<InputIterator>::value_type; // exposition only
|
||||
-----
|
||||
|
||||
=== Equality Comparisons
|
||||
|
||||
==== operator==
|
||||
|
@ -182,26 +182,70 @@ namespace boost {
|
||||
void xref:#unordered_set_rehash[rehash](size_type n);
|
||||
void xref:#unordered_set_reserve[reserve](size_type n);
|
||||
};
|
||||
|
||||
// Deduction Guides
|
||||
template<class InputIterator,
|
||||
class Hash = boost::hash<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
class Pred = std::equal_to<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
class Allocator = std::allocator<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>>
|
||||
unordered_set(InputIterator, InputIterator, typename xref:#unordered_set_deduction_guides[__see below__]::size_type = xref:#unordered_set_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_set<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>, Hash, Pred, Allocator>;
|
||||
|
||||
template<class T, class Hash = boost::hash<T>, class Pred = std::equal_to<T>,
|
||||
class Allocator = std::allocator<T>>
|
||||
unordered_set(std::initializer_list<T>, typename xref:#unordered_set_deduction_guides[__see below__]::size_type = xref:#unordered_set_deduction_guides[__see below__],
|
||||
Hash = Hash(), Pred = Pred(), Allocator = Allocator())
|
||||
-> unordered_set<T, Hash, Pred, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_set(InputIterator, InputIterator, typename xref:#unordered_set_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_set<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Allocator>
|
||||
unordered_set(InputIterator, InputIterator, Allocator)
|
||||
-> unordered_set<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>,
|
||||
boost::hash<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>,
|
||||
std::equal_to<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class InputIterator, class Hash, class Allocator>
|
||||
unordered_set(InputIterator, InputIterator, typename xref:#unordered_set_deduction_guides[__see below__]::size_type, Hash, Allocator)
|
||||
-> unordered_set<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>, Hash,
|
||||
std::equal_to<xref:#unordered_set_iter_value_type[__iter-value-type__]<InputIterator>>, Allocator>;
|
||||
|
||||
template<class T, class Allocator>
|
||||
unordered_set(std::initializer_list<T>, typename xref:#unordered_set_deduction_guides[__see below__]::size_type, Allocator)
|
||||
-> unordered_set<T, boost::hash<T>, std::equal_to<T>, Allocator>;
|
||||
|
||||
template<class T, class Allocator>
|
||||
unordered_set(std::initializer_list<T>, Allocator)
|
||||
-> unordered_set<T, boost::hash<T>, std::equal_to<T>, Allocator>;
|
||||
|
||||
template<class T, class Hash, class Allocator>
|
||||
unordered_set(std::initializer_list<T>, typename xref:#unordered_set_deduction_guides[__see below__]::size_type, Hash, Allocator)
|
||||
-> unordered_set<T, Hash, std::equal_to<T>, Allocator>;
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_set_operator[operator++==++](const unordered_set<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_set<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_set_operator_2[operator!=](const unordered_set<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_set<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_set_swap_2[swap](unordered_set<Key, Hash, Pred, Alloc>& x,
|
||||
unordered_set<Key, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class H, class P, class A, class Predicate>
|
||||
typename unordered_set<K, H, P, A>::size_type
|
||||
xref:#unordered_set_erase_if[erase_if](unordered_set<K, H, P, A>& c, Predicate pred);
|
||||
}
|
||||
|
||||
// Equality Comparisons
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_set_operator[operator++==++](const unordered_set<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_set<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
bool xref:#unordered_set_operator_2[operator!=](const unordered_set<Key, Hash, Pred, Alloc>& x,
|
||||
const unordered_set<Key, Hash, Pred, Alloc>& y);
|
||||
|
||||
// swap
|
||||
template<class Key, class Hash, class Pred, class Alloc>
|
||||
void xref:#unordered_set_swap_2[swap](unordered_set<Key, Hash, Pred, Alloc>& x,
|
||||
unordered_set<Key, Hash, Pred, Alloc>& y)
|
||||
noexcept(noexcept(x.swap(y)));
|
||||
|
||||
template<class K, class H, class P, class A, class Predicate>
|
||||
typename unordered_set<K, H, P, A>::size_type
|
||||
xref:#unordered_set_erase_if[erase_if](unordered_set<K, H, P, A>& c, Predicate pred);
|
||||
-----
|
||||
|
||||
---
|
||||
@ -1384,6 +1428,26 @@ Invalidates iterators, and changes the order of elements. Pointers and reference
|
||||
Throws:;; The function has no effect if an exception is thrown, unless it is thrown by the container's hash function or comparison function.
|
||||
|
||||
|
||||
=== Deduction Guides
|
||||
A deduction guide will not participate in overload resolution if any of the following are true:
|
||||
|
||||
- It has an `InputIterator` template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
|
||||
- It has an `Allocator` template parameter and a type that does not qualify as an allocator is deduced for that parameter.
|
||||
- It has a `Hash` template parameter and an integral type or a type that qualifies as an allocator is deduced for that parameter.
|
||||
- It has a `Pred` template parameter and a type that qualifies as an allocator is deduced for that parameter.
|
||||
|
||||
A `size_type` parameter type in a deduction guide refers to the `size_type` member type of the
|
||||
container type deduced by the deduction guide. Its default value coincides with the default value
|
||||
of the constructor selected.
|
||||
|
||||
==== __iter-value-type__
|
||||
[listings,subs="+macros,+quotes"]
|
||||
-----
|
||||
template<class InputIterator>
|
||||
using __iter-value-type__ =
|
||||
typename std::iterator_traits<InputIterator>::value_type; // exposition only
|
||||
-----
|
||||
|
||||
=== Equality Comparisons
|
||||
|
||||
==== operator==
|
||||
|
Reference in New Issue
Block a user