|
1720 | 1720 | \tcode{c(r, ke)} and \tcode{!c(ke, r)}, with \tcode{c(r, ke)} implying
|
1721 | 1721 | \tcode{!c(ke, r)}.
|
1722 | 1722 | \item
|
| 1723 | +\tcode{kx} is a value such that |
| 1724 | +\begin{itemize} |
| 1725 | +\item |
| 1726 | +\tcode{a} is partitioned with respect to \tcode{c(r, rx)} and \tcode{!c(kx, r)}, |
| 1727 | +with \tcode{c(r, kx)} implying \tcode{!c(kx, r)} |
| 1728 | +\item |
| 1729 | +\tcode{kx} is not convertible to |
| 1730 | +either \tcode{iterator} or \tcode{const_iterator}, |
| 1731 | +\end{itemize} |
| 1732 | +\item |
1723 | 1733 | \tcode{A} denotes the storage allocator used by \tcode{X}, if any, or \tcode{allocator<X::value_type>} otherwise,
|
1724 | 1734 | \item
|
1725 | 1735 | \tcode{m} denotes an allocator of a type convertible to \tcode{A},
|
|
2001 | 2011 | \tcode{node_type}. &
|
2002 | 2012 | $\log (\tcode{a.size()})$ \\ \rowsep
|
2003 | 2013 |
|
| 2014 | +\tcode{a_tran.\brk{}extract(\brk{}kx)} & |
| 2015 | + \tcode{node_type} & |
| 2016 | + \effects Removes the first element in the container with key \tcode{r} |
| 2017 | + such that \tcode{!c(r, kx) \&\& !c(kx, r)} is \tcode{true}.\br |
| 2018 | + \returns A \tcode{node_type} owning the element if found, |
| 2019 | + otherwise an empty \tcode{node_type}. & |
| 2020 | + $\log(\tcode{a_tran.size()})$ \\ \rowsep |
| 2021 | + |
2004 | 2022 | \tcode{a.\brk{}extract(\brk{}q)} &
|
2005 | 2023 | \tcode{node_type} &
|
2006 | 2024 | \effects Removes the element pointed to by \tcode{q}.\br
|
|
2030 | 2048 | \returns The number of erased elements. &
|
2031 | 2049 | $\log (\tcode{a.size()}) + \tcode{a.count(k)}$ \\ \rowsep
|
2032 | 2050 |
|
| 2051 | +\tcode{a_tran.\brk{}erase(kx)} & |
| 2052 | + \tcode{size_type} & |
| 2053 | + \effects Erases all elements in the container with key \tcode{r} |
| 2054 | + such that \tcode{!c(r, kx) \&\& !c(kx, r)} is \tcode{true}.\br |
| 2055 | + \returns The number of erased elements. & |
| 2056 | + $\log(\tcode{a_tran.size())} + \tcode{a_tran.count(kx)}$ \\ \rowsep |
| 2057 | + |
2033 | 2058 | \tcode{a.erase(q)} &
|
2034 | 2059 | \tcode{iterator} &
|
2035 | 2060 | \effects Erases the element pointed to by \tcode{q}.\br
|
|
2204 | 2229 | \pnum
|
2205 | 2230 | The member function templates
|
2206 | 2231 | \tcode{find}, \tcode{count}, \tcode{contains},
|
2207 |
| -\tcode{lower_bound}, \tcode{upper_bound}, and \tcode{equal_range} |
| 2232 | +\tcode{lower_bound}, \tcode{upper_bound}, \tcode{equal_range}, |
| 2233 | +\tcode{erase}, and \tcode{extract} |
2208 | 2234 | shall not participate in overload resolution unless
|
2209 | 2235 | the \grammarterm{qualified-id} \tcode{Compare::is_transparent} is valid
|
2210 | 2236 | and denotes a type\iref{temp.deduct}.
|
| 2237 | +Additionally, the member function templates \tcode{extract} and \tcode{erase} |
| 2238 | +shall not participate in overload resolution if |
| 2239 | +\tcode{is_convertible_v<K\&\&, iterator> || is_convertible_v<K\&\&, const_iterator>} |
| 2240 | +is \tcode{true}, |
| 2241 | +where \tcode{K} is the type substituted as the first template argument. |
2211 | 2242 |
|
2212 | 2243 | \pnum
|
2213 | 2244 | A deduction guide for an associative container shall not participate in overload resolution
|
|
2428 | 2459 | \end{itemize}
|
2429 | 2460 | where \tcode{r1} and \tcode{r2} are keys of elements in \tcode{a_tran},
|
2430 | 2461 | \item
|
| 2462 | +\tcode{kx} is a value such that |
| 2463 | + \begin{itemize} |
| 2464 | + \item \tcode{eq(r1, kx) == eq(kx, r1)}, |
| 2465 | + \item \tcode{hf(r1) == hf(kx)} if \tcode{eq(r1, kx)} is \tcode{true}, |
| 2466 | + \item \tcode{(eq(r1, kx) \&\& eq(r1, r2)) == eq(r2, kx)}, and |
| 2467 | + \item \tcode{kx} is not convertible to |
| 2468 | + either \tcode{iterator} or \tcode{const_iterator} |
| 2469 | + \end{itemize} |
| 2470 | + where \tcode{r1} and \tcode{r2} are keys of elements in \tcode{a_tran}, |
| 2471 | +\item |
2431 | 2472 | \tcode{n} denotes a value of type \tcode{size_type},
|
2432 | 2473 | \item
|
2433 | 2474 | \tcode{z} denotes a value of type \tcode{float}, and
|
|
2813 | 2854 | \tcode{node_type}. &
|
2814 | 2855 | Average case \bigoh{1}, worst case \bigoh{\tcode{a.size()}}. \\ \rowsep
|
2815 | 2856 | %
|
| 2857 | +\tcode{a_tran.\brk{}extract(kx)} & |
| 2858 | + \tcode{node_type} & |
| 2859 | + \effects Removes an element in the container with key equivalent to \tcode{kx}.\br |
| 2860 | + \returns A \tcode{node_type} owning the element if found, |
| 2861 | + otherwise an empty \tcode{node_type}. & |
| 2862 | + Average case \bigoh{1}, worst case \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. \\ \rowsep |
| 2863 | +% |
2816 | 2864 | \tcode{a.extract(q)} &
|
2817 | 2865 | \tcode{node_type} &
|
2818 | 2866 | \effects Removes the element pointed to by \tcode{q}.\br
|
|
2845 | 2893 | \bigoh{\tcode{a.size()}}.
|
2846 | 2894 | \\ \rowsep
|
2847 | 2895 | %
|
| 2896 | +\tcode{a_tran.\brk{}erase(kx)} |
| 2897 | +& \tcode{size_type} |
| 2898 | +& \effects Erases all elements with key equivalent to \tcode{kx}.\br |
| 2899 | + \returns The number of elements erased. |
| 2900 | +& Average case \bigoh{\tcode{a_tran.}\br{}\tcode{count(kx)}}, worst case |
| 2901 | + \bigoh{\tcode{a_tran.}\br{}\tcode{size()}}. |
| 2902 | +\\ \rowsep |
| 2903 | +% |
2848 | 2904 | \tcode{a.erase(q)}
|
2849 | 2905 | & \tcode{iterator}
|
2850 | 2906 | & \effects Erases the element pointed to by \tcode{q}.\br
|
|
3126 | 3182 |
|
3127 | 3183 | \pnum
|
3128 | 3184 | The member function templates
|
3129 |
| -\tcode{find}, \tcode{count}, \tcode{equal_range}, and \tcode{contains} |
| 3185 | +\tcode{find}, \tcode{count}, \tcode{equal_range}, \tcode{contains}, |
| 3186 | +\tcode{extract}, and \tcode{erase} |
3130 | 3187 | shall not participate in overload resolution unless
|
3131 | 3188 | the \grammarterm{qualified-id}s
|
3132 | 3189 | \tcode{Pred::is_transparent} and
|
3133 | 3190 | \tcode{Hash::is_transparent}
|
3134 | 3191 | are both valid and denote types\iref{temp.deduct}.
|
| 3192 | +Additionally, the member function templates \tcode{extract} and \tcode{erase} |
| 3193 | +shall not participate in overload resolution if |
| 3194 | +\tcode{is_convertible_v<K\&\&, iterator> || is_convertible_v<K\&\&, const_iterator>} |
| 3195 | +is \tcode{true}, |
| 3196 | +where \tcode{K} is the type substituted as the first template argument. |
3135 | 3197 |
|
3136 | 3198 | \pnum
|
3137 | 3199 | A deduction guide for an unordered associative container shall not participate in overload resolution
|
|
6674 | 6736 |
|
6675 | 6737 | node_type extract(const_iterator position);
|
6676 | 6738 | node_type extract(const key_type& x);
|
| 6739 | + template<class K> node_type extract(K&& x); |
6677 | 6740 | insert_return_type insert(node_type&& nh);
|
6678 | 6741 | iterator insert(const_iterator hint, node_type&& nh);
|
6679 | 6742 |
|
|
6697 | 6760 | iterator erase(iterator position);
|
6698 | 6761 | iterator erase(const_iterator position);
|
6699 | 6762 | size_type erase(const key_type& x);
|
| 6763 | + template<class K> size_type erase(K&& x); |
6700 | 6764 | iterator erase(const_iterator first, const_iterator last);
|
6701 | 6765 | void swap(map&)
|
6702 | 6766 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
7213 | 7277 |
|
7214 | 7278 | node_type extract(const_iterator position);
|
7215 | 7279 | node_type extract(const key_type& x);
|
| 7280 | + template<class K> node_type extract(K&& x); |
7216 | 7281 | iterator insert(node_type&& nh);
|
7217 | 7282 | iterator insert(const_iterator hint, node_type&& nh);
|
7218 | 7283 |
|
7219 | 7284 | iterator erase(iterator position);
|
7220 | 7285 | iterator erase(const_iterator position);
|
7221 | 7286 | size_type erase(const key_type& x);
|
| 7287 | + template<class K> size_type erase(K&& x); |
7222 | 7288 | iterator erase(const_iterator first, const_iterator last);
|
7223 | 7289 | void swap(multimap&)
|
7224 | 7290 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
7513 | 7579 |
|
7514 | 7580 | node_type extract(const_iterator position);
|
7515 | 7581 | node_type extract(const key_type& x);
|
| 7582 | + template<class K> node_type extract(K&& x); |
7516 | 7583 | insert_return_type insert(node_type&& nh);
|
7517 | 7584 | iterator insert(const_iterator hint, node_type&& nh);
|
7518 | 7585 |
|
7519 | 7586 | iterator erase(iterator position);
|
7520 | 7587 | iterator erase(const_iterator position);
|
7521 | 7588 | size_type erase(const key_type& x);
|
| 7589 | + template<class K> size_type erase(K&& x); |
7522 | 7590 | iterator erase(const_iterator first, const_iterator last);
|
7523 | 7591 | void swap(set&)
|
7524 | 7592 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
7787 | 7855 |
|
7788 | 7856 | node_type extract(const_iterator position);
|
7789 | 7857 | node_type extract(const key_type& x);
|
| 7858 | + template<class K> node_type extract(K&& x); |
7790 | 7859 | iterator insert(node_type&& nh);
|
7791 | 7860 | iterator insert(const_iterator hint, node_type&& nh);
|
7792 | 7861 |
|
7793 | 7862 | iterator erase(iterator position);
|
7794 | 7863 | iterator erase(const_iterator position);
|
7795 | 7864 | size_type erase(const key_type& x);
|
| 7865 | + template<class K> size_type erase(K&& x); |
7796 | 7866 | iterator erase(const_iterator first, const_iterator last);
|
7797 | 7867 | void swap(multiset&)
|
7798 | 7868 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
8216 | 8286 |
|
8217 | 8287 | node_type extract(const_iterator position);
|
8218 | 8288 | node_type extract(const key_type& x);
|
| 8289 | + template<class K> node_type extract(K&& x); |
8219 | 8290 | insert_return_type insert(node_type&& nh);
|
8220 | 8291 | iterator insert(const_iterator hint, node_type&& nh);
|
8221 | 8292 |
|
|
8239 | 8310 | iterator erase(iterator position);
|
8240 | 8311 | iterator erase(const_iterator position);
|
8241 | 8312 | size_type erase(const key_type& k);
|
| 8313 | + template<class K> size_type erase(K&& x); |
8242 | 8314 | iterator erase(const_iterator first, const_iterator last);
|
8243 | 8315 | void swap(unordered_map&)
|
8244 | 8316 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
8811 | 8883 |
|
8812 | 8884 | node_type extract(const_iterator position);
|
8813 | 8885 | node_type extract(const key_type& x);
|
| 8886 | + template<class K> node_type extract(K&& x); |
8814 | 8887 | iterator insert(node_type&& nh);
|
8815 | 8888 | iterator insert(const_iterator hint, node_type&& nh);
|
8816 | 8889 |
|
8817 | 8890 | iterator erase(iterator position);
|
8818 | 8891 | iterator erase(const_iterator position);
|
8819 | 8892 | size_type erase(const key_type& k);
|
| 8893 | + template<class K> size_type erase(K&& x); |
8820 | 8894 | iterator erase(const_iterator first, const_iterator last);
|
8821 | 8895 | void swap(unordered_multimap&)
|
8822 | 8896 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
9176 | 9250 |
|
9177 | 9251 | node_type extract(const_iterator position);
|
9178 | 9252 | node_type extract(const key_type& x);
|
| 9253 | + template<class K> node_type extract(K&& x); |
9179 | 9254 | insert_return_type insert(node_type&& nh);
|
9180 | 9255 | iterator insert(const_iterator hint, node_type&& nh);
|
9181 | 9256 |
|
9182 | 9257 | iterator erase(iterator position);
|
9183 | 9258 | iterator erase(const_iterator position);
|
9184 | 9259 | size_type erase(const key_type& k);
|
| 9260 | + template<class K> size_type erase(K&& x); |
9185 | 9261 | iterator erase(const_iterator first, const_iterator last);
|
9186 | 9262 | void swap(unordered_set&)
|
9187 | 9263 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
9501 | 9577 |
|
9502 | 9578 | node_type extract(const_iterator position);
|
9503 | 9579 | node_type extract(const key_type& x);
|
| 9580 | + template<class K> node_type extract(K&& x); |
9504 | 9581 | iterator insert(node_type&& nh);
|
9505 | 9582 | iterator insert(const_iterator hint, node_type&& nh);
|
9506 | 9583 |
|
9507 | 9584 | iterator erase(iterator position);
|
9508 | 9585 | iterator erase(const_iterator position);
|
9509 | 9586 | size_type erase(const key_type& k);
|
| 9587 | + template<class K> size_type erase(K&& x); |
9510 | 9588 | iterator erase(const_iterator first, const_iterator last);
|
9511 | 9589 | void swap(unordered_multiset&)
|
9512 | 9590 | noexcept(allocator_traits<Allocator>::is_always_equal::value &&
|
|
0 commit comments