Skip to content

Commit 35cca2a

Browse files
committed
[vector.syn, vector.bool] Add subclause structure.
After the addition of the formatting-related specialization, the original subclause contained several class template synopses without any intervening separation. The header synopsis is rearranged to follow the document order.
1 parent fee5683 commit 35cca2a

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

source/containers.tex

+19-14
Original file line numberDiff line numberDiff line change
@@ -6095,23 +6095,26 @@
60956095
constexpr typename vector<T, Allocator>::size_type
60966096
erase_if(vector<T, Allocator>& c, Predicate pred);
60976097

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>;
61006107

61016108
template<class T>
61026109
constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; // \expos
61036110

6104-
template<class T, class charT> requires @\exposid{is-vector-bool-reference}@<T>
6105-
struct formatter<T, charT>;
6106-
61076111
// hash support
61086112
template<class T> struct hash;
61096113
template<class Allocator> struct hash<vector<bool, Allocator>>;
61106114

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>;
61156118
}
61166119
\end{codeblock}
61176120

@@ -9112,14 +9115,14 @@
91129115
\end{codeblock}
91139116
\end{itemdescr}
91149117

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>}}
91169121

91179122
\pnum
91189123
\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:
91239126
\begin{codeblock}
91249127
namespace std {
91259128
template<class Allocator>
@@ -9312,6 +9315,8 @@
93129315
\tcode{vector<bool, Alloc>} is not a program-defined specialization.
93139316
\end{itemdescr}
93149317

9318+
\rSec3[vector.bool.fmt]{Formatter specialization for \tcode{vector<bool>}}
9319+
93159320
\indexlibraryglobal{formatter}%
93169321
\begin{codeblock}
93179322
namespace std {

0 commit comments

Comments
 (0)