|
6095 | 6095 | constexpr typename vector<T, Allocator>::size_type
|
6096 | 6096 | erase_if(vector<T, Allocator>& c, Predicate pred);
|
6097 | 6097 |
|
6098 |
| - // \ref{vector.bool}, class \tcode{vector<bool>} |
6099 |
| - template<class Allocator> class vector<bool, Allocator>; |
| 6098 | + namespace pmr { |
| 6099 | + template<class T> |
| 6100 | + using vector = std::vector<T, polymorphic_allocator<T>>; |
| 6101 | + } |
| 6102 | + |
| 6103 | + // \ref{vector.bool}, specialization for \tcode{bool} |
| 6104 | + // \ref{vector.bool.pspc}, partial class template specialization \tcode{vector<bool, Allocator>} |
| 6105 | + template<class Allocator> |
| 6106 | + class vector<bool, Allocator>; |
6100 | 6107 |
|
6101 | 6108 | template<class T>
|
6102 | 6109 | constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; // \expos
|
6103 | 6110 |
|
6104 |
| - template<class T, class charT> requires @\exposid{is-vector-bool-reference}@<T> |
6105 |
| - struct formatter<T, charT>; |
6106 |
| - |
6107 | 6111 | // hash support
|
6108 | 6112 | template<class T> struct hash;
|
6109 | 6113 | template<class Allocator> struct hash<vector<bool, Allocator>>;
|
6110 | 6114 |
|
6111 |
| - namespace pmr { |
6112 |
| - template<class T> |
6113 |
| - using vector = std::vector<T, polymorphic_allocator<T>>; |
6114 |
| - } |
| 6115 | + // \ref{vector.bool.fmt}, formatter specialization for \tcode{vector<bool>} |
| 6116 | + template<class T, class charT> requires @\exposid{is-vector-bool-reference}@<T> |
| 6117 | + struct formatter<T, charT>; |
6115 | 6118 | }
|
6116 | 6119 | \end{codeblock}
|
6117 | 6120 |
|
|
9112 | 9115 | \end{codeblock}
|
9113 | 9116 | \end{itemdescr}
|
9114 | 9117 |
|
9115 |
| -\rSec2[vector.bool]{Class \tcode{vector<bool>}} |
| 9118 | +\rSec2[vector.bool]{Specialization for \tcode{bool}} |
| 9119 | + |
| 9120 | +\rSec3[vector.bool.pspc]{Partial class template specialization \tcode{vector<bool, Allocator>}} |
9116 | 9121 |
|
9117 | 9122 | \pnum
|
9118 | 9123 | \indexlibraryglobal{vector<bool>}%
|
9119 |
| -To optimize space allocation, a specialization of vector for |
9120 |
| -\tcode{bool} |
9121 |
| -elements is provided: |
9122 |
| - |
| 9124 | +To optimize space allocation, a partial specialization of \tcode{vector} for |
| 9125 | +\tcode{bool} elements is provided: |
9123 | 9126 | \begin{codeblock}
|
9124 | 9127 | namespace std {
|
9125 | 9128 | template<class Allocator>
|
|
9312 | 9315 | \tcode{vector<bool, Alloc>} is not a program-defined specialization.
|
9313 | 9316 | \end{itemdescr}
|
9314 | 9317 |
|
| 9318 | +\rSec3[vector.bool.fmt]{Formatter specialization for \tcode{vector<bool>}} |
| 9319 | + |
9315 | 9320 | \indexlibraryglobal{formatter}%
|
9316 | 9321 | \begin{codeblock}
|
9317 | 9322 | namespace std {
|
|
0 commit comments