Skip to content

[vector.syn, vector.bool] Add subclause structure. #5759

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6095,23 +6095,26 @@
constexpr typename vector<T, Allocator>::size_type
erase_if(vector<T, Allocator>& c, Predicate pred);

// \ref{vector.bool}, class \tcode{vector<bool>}
template<class Allocator> class vector<bool, Allocator>;
namespace pmr {
template<class T>
using vector = std::vector<T, polymorphic_allocator<T>>;
}

// \ref{vector.bool}, specialization of \tcode{vector} for \tcode{bool}
// \ref{vector.bool.pspc}, partial class template specialization \tcode{vector<bool, Allocator>}
template<class Allocator>
class vector<bool, Allocator>;

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

template<class T, class charT> requires @\exposid{is-vector-bool-reference}@<T>
struct formatter<T, charT>;

// hash support
template<class T> struct hash;
template<class Allocator> struct hash<vector<bool, Allocator>>;

namespace pmr {
template<class T>
using vector = std::vector<T, polymorphic_allocator<T>>;
}
// \ref{vector.bool.fmt}, formatter specialization for \tcode{vector<bool>}
template<class T, class charT> requires @\exposid{is-vector-bool-reference}@<T>
struct formatter<T, charT>;
}
\end{codeblock}

Expand Down Expand Up @@ -9112,14 +9115,14 @@
\end{codeblock}
\end{itemdescr}

\rSec2[vector.bool]{Class \tcode{vector<bool>}}
\rSec2[vector.bool]{Specialization of \tcode{vector} for \tcode{bool}}

\rSec3[vector.bool.pspc]{Partial class template specialization \tcode{vector<bool, Allocator>}}

\pnum
\indexlibraryglobal{vector<bool>}%
To optimize space allocation, a specialization of vector for
\tcode{bool}
elements is provided:

To optimize space allocation, a partial specialization of \tcode{vector} for
\tcode{bool} elements is provided:
\begin{codeblock}
namespace std {
template<class Allocator>
Expand Down Expand Up @@ -9312,6 +9315,8 @@
\tcode{vector<bool, Alloc>} is not a program-defined specialization.
\end{itemdescr}

\rSec3[vector.bool.fmt]{Formatter specialization for \tcode{vector<bool>}}

\indexlibraryglobal{formatter}%
\begin{codeblock}
namespace std {
Expand Down