|
2928 | 2928 | \tcode{<list>}, and \tcode{<vector>} define class templates that meet the
|
2929 | 2929 | requirements for sequence containers.
|
2930 | 2930 |
|
| 2931 | +\pnum |
| 2932 | +The following exposition-only alias template may appear in deduction guides for sequence containers: |
| 2933 | + |
| 2934 | +\begin{codeblock} |
| 2935 | +template<class InputIterator> |
| 2936 | + using @\placeholdernc{iter-value-type}@ = typename iterator_traits<InputIterator>::value_type; // \expos |
| 2937 | +\end{codeblock} |
| 2938 | + |
2931 | 2939 | \rSec2[array.syn]{Header \tcode{<array>} synopsis}
|
2932 | 2940 |
|
2933 | 2941 | \indexhdr{array}%
|
|
3501 | 3509 | void clear() noexcept;
|
3502 | 3510 | };
|
3503 | 3511 |
|
3504 |
| - template<class InputIterator, |
3505 |
| - class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>> |
| 3512 | + template<class InputIterator, class Allocator = allocator<@\placeholder{iter-value-type}@<InputIterator>>> |
3506 | 3513 | deque(InputIterator, InputIterator, Allocator = Allocator())
|
3507 |
| - -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>; |
| 3514 | + -> deque<@\placeholder{iter-value-type}@<InputIterator>, Allocator>; |
3508 | 3515 |
|
3509 | 3516 | // \ref{deque.special}, specialized algorithms
|
3510 | 3517 | template<class T, class Allocator>
|
|
3890 | 3897 | void reverse() noexcept;
|
3891 | 3898 | };
|
3892 | 3899 |
|
3893 |
| - template<class InputIterator, |
3894 |
| - class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>> |
| 3900 | + template<class InputIterator, class Allocator = allocator<@\placeholder{iter-value-type}@<InputIterator>>> |
3895 | 3901 | forward_list(InputIterator, InputIterator, Allocator = Allocator())
|
3896 |
| - -> forward_list<typename iterator_traits<InputIterator>::value_type, Allocator>; |
| 3902 | + -> forward_list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>; |
3897 | 3903 |
|
3898 | 3904 | // \ref{forwardlist.spec}, specialized algorithms
|
3899 | 3905 | template<class T, class Allocator>
|
|
4597 | 4603 | void reverse() noexcept;
|
4598 | 4604 | };
|
4599 | 4605 |
|
4600 |
| - template<class InputIterator, |
4601 |
| - class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>> |
| 4606 | + template<class InputIterator, class Allocator = allocator<@\placeholder{iter-value-type}@<InputIterator>>> |
4602 | 4607 | list(InputIterator, InputIterator, Allocator = Allocator())
|
4603 |
| - -> list<typename iterator_traits<InputIterator>::value_type, Allocator>; |
| 4608 | + -> list<@\placeholder{iter-value-type}@<InputIterator>, Allocator>; |
4604 | 4609 |
|
4605 | 4610 | // \ref{list.special}, specialized algorithms
|
4606 | 4611 | template<class T, class Allocator>
|
|
5259 | 5264 | void clear() noexcept;
|
5260 | 5265 | };
|
5261 | 5266 |
|
5262 |
| - template<class InputIterator, |
5263 |
| - class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>> |
| 5267 | + template<class InputIterator, class Allocator = allocator<@\placeholder{iter-value-type}@<InputIterator>>> |
5264 | 5268 | vector(InputIterator, InputIterator, Allocator = Allocator())
|
5265 |
| - -> vector<typename iterator_traits<InputIterator>::value_type, Allocator>; |
| 5269 | + -> vector<@\placeholder{iter-value-type}@<InputIterator>, Allocator>; |
5266 | 5270 |
|
5267 | 5271 | // \ref{vector.special}, specialized algorithms
|
5268 | 5272 | template<class T, class Allocator>
|
|
0 commit comments