Skip to content

[lib] Use CharT and Traits as template parameter names #7758

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
\change
Removed the \tcode{formatter} specialization:
\begin{codeblock}
template<size_t N> struct formatter<const charT[N], charT>;
template<size_t N> struct formatter<const CharT[N], CharT>;
\end{codeblock}
\rationale
The specialization is inconsistent with the design of \tcode{formatter},
Expand Down
30 changes: 15 additions & 15 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9825,8 +9825,8 @@
template<class Allocator> struct hash<vector<bool, Allocator>>;

// \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>;
template<class T, class CharT> requires @\exposid{is-vector-bool-reference}@<T>
struct formatter<T, CharT>;
}
\end{codeblock}

Expand Down Expand Up @@ -10656,11 +10656,11 @@
\indexlibraryglobal{formatter}%
\begin{codeblock}
namespace std {
template<class T, class charT>
template<class T, class CharT>
requires @\exposid{is-vector-bool-reference}@<T>
struct formatter<T, charT> {
struct formatter<T, CharT> {
private:
formatter<bool, charT> @\exposid{underlying_}@; // \expos
formatter<bool, CharT> @\exposid{underlying_}@; // \expos

public:
template<class ParseContext>
Expand Down Expand Up @@ -15622,8 +15622,8 @@
struct uses_allocator<queue<T, Container>, Alloc>;

// \ref{container.adaptors.format}, formatter specialization for \tcode{queue}
template<class charT, class T, @\libconcept{formattable}@<charT> Container>
struct formatter<queue<T, Container>, charT>;
template<class CharT, class T, @\libconcept{formattable}@<CharT> Container>
struct formatter<queue<T, Container>, CharT>;

// \ref{priority.queue}, class template \tcode{priority_queue}
template<class T, class Container = vector<T>,
Expand All @@ -15637,8 +15637,8 @@
struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>;

// \ref{container.adaptors.format}, formatter specialization for \tcode{priority_queue}
template<class charT, class T, @\libconcept{formattable}@<charT> Container, class Compare>
struct formatter<priority_queue<T, Container, Compare>, charT>;
template<class CharT, class T, @\libconcept{formattable}@<CharT> Container, class Compare>
struct formatter<priority_queue<T, Container, Compare>, CharT>;
}
\end{codeblock}

Expand Down Expand Up @@ -16548,8 +16548,8 @@
struct uses_allocator<stack<T, Container>, Alloc>;

// \ref{container.adaptors.format}, formatter specialization for \tcode{stack}
template<class charT, class T, @\libconcept{formattable}@<charT> Container>
struct formatter<stack<T, Container>, charT>;
template<class CharT, class T, @\libconcept{formattable}@<CharT> Container>
struct formatter<stack<T, Container>, CharT>;
}
\end{codeblock}

Expand Down Expand Up @@ -20121,15 +20121,15 @@
\indexlibraryglobal{formatter}%
\begin{codeblock}
namespace std {
template<class charT, class T, @\libconcept{formattable}@<charT> Container, class... U>
struct formatter<@\placeholder{adaptor-type}@<T, Container, U...>, charT> {
template<class CharT, class T, @\libconcept{formattable}@<CharT> Container, class... U>
struct formatter<@\placeholder{adaptor-type}@<T, Container, U...>, CharT> {
private:
using @\exposid{maybe-const-container}@ = // \expos
@\exposid{fmt-maybe-const}@<Container, charT>;
@\exposid{fmt-maybe-const}@<Container, CharT>;
using @\exposid{maybe-const-adaptor}@ = // \expos
@\exposid{maybe-const}@<is_const_v<@\exposid{maybe-const-container}@>, // see \ref{ranges.syn}
@\placeholder{adaptor-type}@<T, Container, U...>>;
formatter<ranges::ref_view<@\exposid{maybe-const-container}@>, charT> @\exposid{underlying_}@; // \expos
formatter<ranges::ref_view<@\exposid{maybe-const-container}@>, CharT> @\exposid{underlying_}@; // \expos

public:
template<class ParseContext>
Expand Down
16 changes: 8 additions & 8 deletions source/diagnostics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@
// \ref{syserr.errcode.nonmembers}, non-member functions
error_code make_error_code(errc e) noexcept;

template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const error_code& ec);
template<class CharT, class Traits>
basic_ostream<CharT, Traits>&
operator<<(basic_ostream<CharT, Traits>& os, const error_code& ec);

// \ref{syserr.errcondition.nonmembers}, non-member functions
error_condition make_error_condition(errc e) noexcept;
Expand Down Expand Up @@ -1049,9 +1049,9 @@
// \ref{syserr.errcode.nonmembers}, non-member functions
error_code make_error_code(errc e) noexcept;

template<class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const error_code& ec);
template<class CharT, class Traits>
basic_ostream<CharT, Traits>&
operator<<(basic_ostream<CharT, Traits>& os, const error_code& ec);
}
\end{codeblock}

Expand Down Expand Up @@ -1222,8 +1222,8 @@

\indexlibrarymember{operator<<}{error_code}%
\begin{itemdecl}
template<class charT, class traits>
basic_ostream<charT, traits>& operator<<(basic_ostream<charT, traits>& os, const error_code& ec);
template<class CharT, class Traits>
basic_ostream<CharT, Traits>& operator<<(basic_ostream<CharT, Traits>& os, const error_code& ec);
\end{itemdecl}

\begin{itemdescr}
Expand Down
2 changes: 1 addition & 1 deletion source/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@
\termref{defns.character}{character}{} type
that precede the terminating null character type
value
\tcode{charT()}
\tcode{CharT()}

\definition{observer function}{defns.observer}
\defncontext{library}
Expand Down
Loading