|
528 | 528 | and an rvalue \tcode{rv} of type \tcode{T},
|
529 | 529 | the following terms are defined. If \tcode{X}
|
530 | 530 | is not allocator-aware, the terms below are defined as if \tcode{A} were
|
531 |
| -\tcode{std::allocator<T>} --- no allocator object needs to be created |
532 |
| -and user specializations of \tcode{std::allocator<T>} are not instantiated: |
| 531 | +\tcode{allocator<T>} --- no allocator object needs to be created |
| 532 | +and user specializations of \tcode{allocator<T>} are not instantiated: |
533 | 533 |
|
534 | 534 | \begin{itemize}
|
535 | 535 | \item
|
|
596 | 596 | A container calls \tcode{allocator_traits<A>::construct(m, p, args)}
|
597 | 597 | to construct an element at \tcode{p} using \tcode{args},
|
598 | 598 | with \tcode{m == get_allocator()}.
|
599 |
| -The default \tcode{construct} in \tcode{std::allocator} will |
| 599 | +The default \tcode{construct} in \tcode{allocator} will |
600 | 600 | call \tcode{::new((void*)p) T(args)},
|
601 | 601 | but specialized allocators may choose a different definition.
|
602 | 602 | \end{note}
|
|
765 | 765 | \tcode{A} denotes \tcode{X::allocator_type} if
|
766 | 766 | the \grammarterm{qualified-id} \tcode{X::allocator_type} is valid and denotes a
|
767 | 767 | type~(\ref{temp.deduct}) and
|
768 |
| -\tcode{std::allocator<T>} if it doesn't, |
| 768 | +\tcode{allocator<T>} if it doesn't, |
769 | 769 | \tcode{i} and \tcode{j}
|
770 | 770 | denote iterators satisfying input iterator requirements
|
771 | 771 | and refer to elements implicitly convertible to \tcode{value_type},
|
|
1222 | 1222 | this name.
|
1223 | 1223 |
|
1224 | 1224 | \pnum
|
1225 |
| -If a user-defined specialization of \tcode{std::pair} exists for |
| 1225 | +If a user-defined specialization of \tcode{pair} exists for |
1226 | 1226 | \tcode{pair<const Key, T>} or \tcode{pair<Key, T>}, where \tcode{Key} is the
|
1227 | 1227 | container's \tcode{key_type} and \tcode{T} is the container's
|
1228 | 1228 | \tcode{mapped_type}, the behavior of operations involving node handles is
|
|
1579 | 1579 | \tcode{ke} is a value such that \tcode{a} is partitioned with respect to
|
1580 | 1580 | \tcode{c(r, ke)} and \tcode{!c(ke, r)}, with \tcode{c(r, ke)} implying
|
1581 | 1581 | \tcode{!c(ke, r)}.
|
1582 |
| -\tcode{A} denotes the storage allocator used by \tcode{X}, if any, or \tcode{std::allocator<X::value_type>} otherwise, |
| 1582 | +\tcode{A} denotes the storage allocator used by \tcode{X}, if any, or \tcode{allocator<X::value_type>} otherwise, |
1583 | 1583 | \tcode{m} denotes an allocator of a type convertible to \tcode{A},
|
1584 | 1584 | and \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}.
|
1585 | 1585 |
|
|
2112 | 2112 | \pnum
|
2113 | 2113 | For \tcode{unordered_set} and \tcode{unordered_multiset} the value type is
|
2114 | 2114 | the same as the key type. For \tcode{unordered_map} and
|
2115 |
| -\tcode{unordered_multimap} it is \tcode{std::pair<const Key, |
| 2115 | +\tcode{unordered_multimap} it is \tcode{pair<const Key, |
2116 | 2116 | T>}.
|
2117 | 2117 |
|
2118 | 2118 | \pnum
|
|
2218 | 2218 | \tcode{X::hasher}
|
2219 | 2219 | & \tcode{Hash}
|
2220 | 2220 | & \tcode{Hash} shall be a unary function object type such that the expression
|
2221 |
| - \tcode{hf(k)} has type \tcode{std::size_t}.% |
| 2221 | + \tcode{hf(k)} has type \tcode{size_t}.% |
2222 | 2222 | \indextext{unordered associative containers!\idxcode{hasher}}%
|
2223 | 2223 | \indextext{\idxcode{hasher}!unordered associative containers}%
|
2224 | 2224 | & compile time
|
|
6266 | 6266 | \pnum
|
6267 | 6267 | \remarks
|
6268 | 6268 | These signatures shall not participate in overload resolution
|
6269 |
| -unless \tcode{std::is_constructible_v<value_type, P\&\&>} is |
| 6269 | +unless \tcode{is_constructible_v<value_type, P\&\&>} is |
6270 | 6270 | \tcode{true}.
|
6271 | 6271 | \end{itemdescr}
|
6272 | 6272 |
|
|
6722 | 6722 | \pnum
|
6723 | 6723 | \remarks
|
6724 | 6724 | These signatures shall not participate in overload resolution
|
6725 |
| -unless \tcode{std::is_constructible_v<value_type, P\&\&>} is |
| 6725 | +unless \tcode{is_constructible_v<value_type, P\&\&>} is |
6726 | 6726 | \tcode{true}.
|
6727 | 6727 | \end{itemdescr}
|
6728 | 6728 |
|
|
7300 | 7300 | template <class Key,
|
7301 | 7301 | class T,
|
7302 | 7302 | class Hash = hash<Key>,
|
7303 |
| - class Pred = std::equal_to<Key>, |
7304 |
| - class Alloc = std::allocator<std::pair<const Key, T>>> |
| 7303 | + class Pred = equal_to<Key>, |
| 7304 | + class Alloc = allocator<pair<const Key, T>>> |
7305 | 7305 | class unordered_map;
|
7306 | 7306 |
|
7307 | 7307 | // \ref{unord.multimap}, class template unordered_multimap
|
7308 | 7308 | template <class Key,
|
7309 | 7309 | class T,
|
7310 | 7310 | class Hash = hash<Key>,
|
7311 |
| - class Pred = std::equal_to<Key>, |
7312 |
| - class Alloc = std::allocator<std::pair<const Key, T>>> |
| 7311 | + class Pred = equal_to<Key>, |
| 7312 | + class Alloc = allocator<pair<const Key, T>>> |
7313 | 7313 | class unordered_multimap;
|
7314 | 7314 |
|
7315 | 7315 | template <class Key, class T, class Hash, class Pred, class Alloc>
|
|
7366 | 7366 | // \ref{unord.set}, class template unordered_set
|
7367 | 7367 | template <class Key,
|
7368 | 7368 | class Hash = hash<Key>,
|
7369 |
| - class Pred = std::equal_to<Key>, |
7370 |
| - class Alloc = std::allocator<Key>> |
| 7369 | + class Pred = equal_to<Key>, |
| 7370 | + class Alloc = allocator<Key>> |
7371 | 7371 | class unordered_set;
|
7372 | 7372 |
|
7373 | 7373 | // \ref{unord.multiset}, class template unordered_multiset
|
7374 | 7374 | template <class Key,
|
7375 | 7375 | class Hash = hash<Key>,
|
7376 |
| - class Pred = std::equal_to<Key>, |
7377 |
| - class Alloc = std::allocator<Key>> |
| 7376 | + class Pred = equal_to<Key>, |
| 7377 | + class Alloc = allocator<Key>> |
7378 | 7378 | class unordered_multiset;
|
7379 | 7379 |
|
7380 | 7380 | template <class Key, class Hash, class Pred, class Alloc>
|
|
7432 | 7432 | supports forward iterators.
|
7433 | 7433 |
|
7434 | 7434 | \pnum
|
7435 |
| -An \tcode{unordered_map} satisfies all of the requirements of a container, of an unordered associative container, and of an allocator-aware container (Table~\ref{tab:containers.allocatoraware}). It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_map} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_map<Key, T>} the \tcode{key type} is \tcode{Key}, the mapped type is \tcode{T}, and the value type is \tcode{std::pair<const Key, T>}. |
| 7435 | +An \tcode{unordered_map} satisfies all of the requirements of a container, of an unordered associative container, and of an allocator-aware container (Table~\ref{tab:containers.allocatoraware}). It provides the operations described in the preceding requirements table for unique keys; that is, an \tcode{unordered_map} supports the \tcode{a_uniq} operations in that table, not the \tcode{a_eq} operations. For an \tcode{unordered_map<Key, T>} the \tcode{key type} is \tcode{Key}, the mapped type is \tcode{T}, and the value type is \tcode{pair<const Key, T>}. |
7436 | 7436 |
|
7437 | 7437 | \pnum
|
7438 | 7438 | This section only describes operations on \tcode{unordered_map} that
|
|
7445 | 7445 | template <class Key,
|
7446 | 7446 | class T,
|
7447 | 7447 | class Hash = hash<Key>,
|
7448 |
| - class Pred = std::equal_to<Key>, |
7449 |
| - class Allocator = std::allocator<std::pair<const Key, T>>> |
| 7448 | + class Pred = equal_to<Key>, |
| 7449 | + class Allocator = allocator<pair<const Key, T>>> |
7450 | 7450 | class unordered_map {
|
7451 | 7451 | public:
|
7452 | 7452 | // types:
|
|
7591 | 7591 | iterator find(const key_type& k);
|
7592 | 7592 | const_iterator find(const key_type& k) const;
|
7593 | 7593 | size_type count(const key_type& k) const;
|
7594 |
| - std::pair<iterator, iterator> equal_range(const key_type& k); |
7595 |
| - std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 7594 | + pair<iterator, iterator> equal_range(const key_type& k); |
| 7595 | + pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
7596 | 7596 |
|
7597 | 7597 | // \ref{unord.map.elem}, element access
|
7598 | 7598 | mapped_type& operator[](const key_type& k);
|
|
7743 | 7743 |
|
7744 | 7744 | \pnum
|
7745 | 7745 | \remarks This signature shall not participate in overload resolution
|
7746 |
| -unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
| 7746 | +unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
7747 | 7747 | \end{itemdescr}
|
7748 | 7748 |
|
7749 | 7749 | \indexlibrarymember{unordered_map}{insert}%
|
|
7759 | 7759 |
|
7760 | 7760 | \pnum
|
7761 | 7761 | \remarks This signature shall not participate in overload resolution
|
7762 |
| -unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
| 7762 | +unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
7763 | 7763 | \end{itemdescr}
|
7764 | 7764 |
|
7765 | 7765 | \indexlibrarymember{try_emplace}{unordered_map}%
|
|
7940 | 7940 | preceding requirements table for equivalent keys; that is, an \tcode{unordered_multimap}
|
7941 | 7941 | supports the \tcode{a_eq} operations in that table, not the \tcode{a_uniq} operations.
|
7942 | 7942 | For an \tcode{unordered_multimap<Key, T>} the \tcode{key type} is \tcode{Key}, the
|
7943 |
| -mapped type is \tcode{T}, and the value type is \tcode{std::pair<const Key, T>}. |
| 7943 | +mapped type is \tcode{T}, and the value type is \tcode{pair<const Key, T>}. |
7944 | 7944 |
|
7945 | 7945 | \pnum
|
7946 | 7946 | This section only describes operations on \tcode{unordered_multimap}
|
|
7953 | 7953 | template <class Key,
|
7954 | 7954 | class T,
|
7955 | 7955 | class Hash = hash<Key>,
|
7956 |
| - class Pred = std::equal_to<Key>, |
7957 |
| - class Allocator = std::allocator<std::pair<const Key, T>>> |
| 7956 | + class Pred = equal_to<Key>, |
| 7957 | + class Allocator = allocator<pair<const Key, T>>> |
7958 | 7958 | class unordered_multimap {
|
7959 | 7959 | public:
|
7960 | 7960 | // types:
|
|
8081 | 8081 | iterator find(const key_type& k);
|
8082 | 8082 | const_iterator find(const key_type& k) const;
|
8083 | 8083 | size_type count(const key_type& k) const;
|
8084 |
| - std::pair<iterator, iterator> equal_range(const key_type& k); |
8085 |
| - std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 8084 | + pair<iterator, iterator> equal_range(const key_type& k); |
| 8085 | + pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
8086 | 8086 |
|
8087 | 8087 | // bucket interface:
|
8088 | 8088 | size_type bucket_count() const noexcept;
|
|
8189 | 8189 |
|
8190 | 8190 | \pnum
|
8191 | 8191 | \remarks This signature shall not participate in overload resolution
|
8192 |
| -unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
| 8192 | +unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
8193 | 8193 | \end{itemdescr}
|
8194 | 8194 |
|
8195 | 8195 | \indexlibrarymember{unordered_multimap}{insert}%
|
|
8205 | 8205 |
|
8206 | 8206 | \pnum
|
8207 | 8207 | \remarks This signature shall not participate in overload resolution
|
8208 |
| -unless \tcode{std::is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
| 8208 | +unless \tcode{is_constructible_v<value_type, P\&\&>} is \tcode{true}. |
8209 | 8209 | \end{itemdescr}
|
8210 | 8210 |
|
8211 | 8211 | \rSec3[unord.multimap.swap]{\tcode{unordered_multimap} swap}
|
|
8251 | 8251 | namespace std {
|
8252 | 8252 | template <class Key,
|
8253 | 8253 | class Hash = hash<Key>,
|
8254 |
| - class Pred = std::equal_to<Key>, |
8255 |
| - class Allocator = std::allocator<Key>> |
| 8254 | + class Pred = equal_to<Key>, |
| 8255 | + class Allocator = allocator<Key>> |
8256 | 8256 | class unordered_set {
|
8257 | 8257 | public:
|
8258 | 8258 | // types:
|
|
8377 | 8377 | iterator find(const key_type& k);
|
8378 | 8378 | const_iterator find(const key_type& k) const;
|
8379 | 8379 | size_type count(const key_type& k) const;
|
8380 |
| - std::pair<iterator, iterator> equal_range(const key_type& k); |
8381 |
| - std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 8380 | + pair<iterator, iterator> equal_range(const key_type& k); |
| 8381 | + pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
8382 | 8382 |
|
8383 | 8383 | // bucket interface:
|
8384 | 8384 | size_type bucket_count() const noexcept;
|
|
8519 | 8519 | namespace std {
|
8520 | 8520 | template <class Key,
|
8521 | 8521 | class Hash = hash<Key>,
|
8522 |
| - class Pred = std::equal_to<Key>, |
8523 |
| - class Allocator = std::allocator<Key>> |
| 8522 | + class Pred = equal_to<Key>, |
| 8523 | + class Allocator = allocator<Key>> |
8524 | 8524 | class unordered_multiset {
|
8525 | 8525 | public:
|
8526 | 8526 | // types:
|
|
8644 | 8644 | iterator find(const key_type& k);
|
8645 | 8645 | const_iterator find(const key_type& k) const;
|
8646 | 8646 | size_type count(const key_type& k) const;
|
8647 |
| - std::pair<iterator, iterator> equal_range(const key_type& k); |
8648 |
| - std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
| 8647 | + pair<iterator, iterator> equal_range(const key_type& k); |
| 8648 | + pair<const_iterator, const_iterator> equal_range(const key_type& k) const; |
8649 | 8649 |
|
8650 | 8650 | // bucket interface:
|
8651 | 8651 | size_type bucket_count() const noexcept;
|
|
0 commit comments