|
700 | 700 |
|
701 | 701 | \end{libreqtab4a}
|
702 | 702 |
|
| 703 | +\pnum |
| 704 | +The behavior of certain container member functions and deduction guides |
| 705 | +depends on whether types qualify as input iterators or allocators. |
| 706 | +The extent to which an implementation determines that a type cannot be an input |
| 707 | +iterator is unspecified, except that as a minimum integral types shall not qualify |
| 708 | +as input iterators. |
| 709 | +Likewise, the extent to which an implementation determines that a type cannot be |
| 710 | +an allocator is unspecified, except that as a minimum a type \tcode{A} shall not qualify |
| 711 | +as an allocator unless it satisfies both of the following conditions: |
| 712 | + |
| 713 | +\begin{itemize} |
| 714 | +\item The \grammarterm{qualified-id} \tcode{A::value_type} |
| 715 | +is valid and denotes a type~(\ref{temp.deduct}). |
| 716 | + |
| 717 | +\item The expression \tcode{declval<A\&>().allocate(size_t\{\})} |
| 718 | +is well-formed when treated as an unevaluated operand. |
| 719 | +\end{itemize} |
| 720 | + |
703 | 721 | \rSec2[container.requirements.dataraces]{Container data races}
|
704 | 722 |
|
705 | 723 | \pnum
|
|
1002 | 1020 | shall not participate in overload resolution.
|
1003 | 1021 |
|
1004 | 1022 | \item A deduction guide for a sequence container shall not participate in overload resolution
|
1005 |
| -if it has an \tcode{InputIterator} template parameter that is called with a type that does not |
1006 |
| -qualify as an input iterator, |
1007 |
| -or if it has an \tcode{Allocator} template parameter that is called with a type that does not |
1008 |
| -qualify as an allocator. |
1009 |
| -\end{itemize} |
1010 |
| - |
1011 |
| -\pnum |
1012 |
| -The extent to which an implementation determines that a type cannot be an input |
1013 |
| -iterator is unspecified, except that as a minimum integral types shall not qualify |
1014 |
| -as input iterators. |
1015 |
| -Likewise, the extent to which an implementation determines that a type cannot be |
1016 |
| -an allocator is unspecified, except that as a minimum a type \tcode{A} not satisfying |
1017 |
| -both of the following conditions shall not qualify as an allocator: |
1018 |
| - |
1019 |
| -\begin{itemize} |
1020 |
| -\item The \grammarterm{qualified-id} \tcode{A::value_type} |
1021 |
| -is valid and denotes a type~(\ref{temp.deduct}). |
1022 |
| - |
1023 |
| -\item The expression \tcode{declval<A\&>().allocate(size_t\{\})} |
1024 |
| -is well-formed when treated as an unevaluated operand. |
| 1023 | +if it has an \tcode{InputIterator} template parameter and a type that does not |
| 1024 | +qualify as an input iterator is deduced for that parameter, |
| 1025 | +or if it has an \tcode{Allocator} template parameter and a type that does not |
| 1026 | +qualify as an allocator is deduced for that parameter. |
1025 | 1027 | \end{itemize}
|
1026 | 1028 |
|
1027 | 1029 | \pnum
|
|
2038 | 2040 | if any of the following are true:
|
2039 | 2041 | \begin{itemize}
|
2040 | 2042 | \item It has an \tcode{InputIterator} template parameter
|
2041 |
| -that is called with a type that does not qualify as an input iterator. |
| 2043 | +and a type that does not qualify as an input iterator is deduced for that parameter. |
2042 | 2044 |
|
2043 | 2045 | \item It has an \tcode{Allocator} template parameter
|
2044 |
| -that is called with a type that does not qualify as an allocator. |
| 2046 | +and a type that does not qualify as an allocator is deduced for that parameter. |
2045 | 2047 |
|
2046 | 2048 | \item It has a \tcode{Compare} template parameter
|
2047 |
| -that is called with a type that qualifies as an allocator. |
| 2049 | +and a type that qualifies as an allocator is deduced for that parameter. |
2048 | 2050 | \end{itemize}
|
2049 | 2051 |
|
2050 | 2052 | \indextext{associative containers!exception safety}%
|
|
2871 | 2873 | if any of the following are true:
|
2872 | 2874 | \begin{itemize}
|
2873 | 2875 | \item It has an \tcode{InputIterator} template parameter
|
2874 |
| -that is called with a type that does not qualify as an input iterator. |
| 2876 | +and a type that does not qualify as an input iterator is deduced for that parameter. |
2875 | 2877 |
|
2876 | 2878 | \item It has an \tcode{Allocator} template parameter
|
2877 |
| -that is called with a type that does not qualify as an allocator. |
| 2879 | +and a type that does not qualify as an allocator is deduced for that parameter. |
2878 | 2880 |
|
2879 | 2881 | \item It has a \tcode{Hash} template parameter
|
2880 |
| -that is called with an integral type or a type that qualifies as an allocator. |
| 2882 | +and an integral type or a type that qualifies as an allocator is deduced for that parameter. |
2881 | 2883 |
|
2882 | 2884 | \item It has a \tcode{Pred} template parameter
|
2883 |
| -that is called with a type that qualifies as an allocator. |
| 2885 | +and a type that qualifies as an allocator is deduced for that parameter. |
2884 | 2886 | \end{itemize}
|
2885 | 2887 |
|
2886 | 2888 | \rSec3[unord.req.except]{Exception safety guarantees}
|
|
9164 | 9166 | \pnum
|
9165 | 9167 | A deduction guide for a container adaptor shall not participate in overload resolution if any of the following are true:
|
9166 | 9168 | \begin{itemize}
|
9167 |
| -\item It has an \tcode{InputIterator} template parameter that is called with a type that does not qualify as an input iterator. |
9168 |
| -\item It has a \tcode{Compare} template parameter that is called with a type that qualifies as an allocator. |
9169 |
| -\item It has a \tcode{Container} template parameter that is called with a type that qualifies as an allocator. |
9170 |
| -\item It has an \tcode{Allocator} template parameter that is called with a type that does not qualify as an allocator. |
| 9169 | +\item It has an \tcode{InputIterator} template parameter and a type that does not qualify as an input iterator is deduced for that parameter. |
| 9170 | +\item It has a \tcode{Compare} template parameter and a type that qualifies as an allocator is deduced for that parameter. |
| 9171 | +\item It has a \tcode{Container} template parameter and a type that qualifies as an allocator is deduced for that parameter. |
| 9172 | +\item It has an \tcode{Allocator} template parameter and a type that does not qualify as an allocator is deduced for that parameter. |
9171 | 9173 | \item It has both \tcode{Container} and \tcode{Allocator} template parameters, and \tcode{uses_allocator_v<Container, Allocator>} is \tcode{false}.
|
9172 | 9174 | \end{itemize}
|
9173 | 9175 |
|
|
0 commit comments