Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

P2508R1 Expose std::basic-format-string<charT, Args...> #5690

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

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Changes from 1 commit
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
96 changes: 49 additions & 47 deletions 96 source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13777,40 +13777,38 @@
using format_args = basic_format_args<format_context>;
using wformat_args = basic_format_args<wformat_context>;

// \ref{format.fmt.string}, class template \exposid{basic-format-string}
// \ref{format.fmt.string}, class template \tcode{basic_format_string}
template<class charT, class... Args>
struct @\exposid{basic-format-string}@; // \expos
struct basic_format_string;

template<class... Args>
using @\exposid{format-string}@ = // \expos
@\exposid{basic-format-string}@<char, type_identity_t<Args>...>;
using @\libglobal{format_string}@ = basic_format_string<char, type_identity_t<Args>...>;
template<class... Args>
using @\exposid{wformat-string}@ = // \expos
@\exposid{basic-format-string}@<wchar_t, type_identity_t<Args>...>;
using @\libglobal{wformat_string}@ = basic_format_string<wchar_t, type_identity_t<Args>...>;

// \ref{format.functions}, formatting functions
template<class... Args>
string format(@\exposid{format-string}@<Args...> fmt, Args&&... args);
string format(format_string<Args...> fmt, Args&&... args);
template<class... Args>
wstring format(@\exposid{wformat-string}@<Args...> fmt, Args&&... args);
wstring format(wformat_string<Args...> fmt, Args&&... args);
template<class... Args>
string format(const locale& loc, @\exposid{format-string}@<Args...> fmt, Args&&... args);
string format(const locale& loc, format_string<Args...> fmt, Args&&... args);
template<class... Args>
wstring format(const locale& loc, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
wstring format(const locale& loc, wformat_string<Args...> fmt, Args&&... args);

string vformat(string_view fmt, format_args args);
wstring vformat(wstring_view fmt, wformat_args args);
string vformat(const locale& loc, string_view fmt, format_args args);
wstring vformat(const locale& loc, wstring_view fmt, wformat_args args);

template<class Out, class... Args>
Out format_to(Out out, @\exposid{format-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, format_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
Out format_to(Out out, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, wformat_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
Out format_to(Out out, const locale& loc, @\exposid{format-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, const locale& loc, format_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
Out format_to(Out out, const locale& loc, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, const locale& loc, wformat_string<Args...> fmt, Args&&... args);

template<class Out>
Out vformat_to(Out out, string_view fmt, format_args args);
Expand All @@ -13827,27 +13825,27 @@
};
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
@\exposid{format-string}@<Args...> fmt, Args&&... args);
format_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
@\exposid{wformat-string}@<Args...> fmt, Args&&... args);
wformat_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
const locale& loc, @\exposid{format-string}@<Args...> fmt,
const locale& loc, format_string<Args...> fmt,
Args&&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
const locale& loc, @\exposid{wformat-string}@<Args...> fmt,
const locale& loc, wformat_string<Args...> fmt,
Args&&... args);

template<class... Args>
size_t formatted_size(@\exposid{format-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(format_string<Args...> fmt, Args&&... args);
template<class... Args>
size_t formatted_size(@\exposid{wformat-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(wformat_string<Args...> fmt, Args&&... args);
template<class... Args>
size_t formatted_size(const locale& loc, @\exposid{format-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(const locale& loc, format_string<Args...> fmt, Args&&... args);
template<class... Args>
size_t formatted_size(const locale& loc, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(const locale& loc, wformat_string<Args...> fmt, Args&&... args);

// \ref{format.formatter}, formatter
template<class T, class charT = char> struct formatter;
Expand Down Expand Up @@ -14618,21 +14616,25 @@
Failure to allocate storage is reported by
throwing an exception as described in~\ref{res.on.exception.handling}.

\rSec2[format.fmt.string]{Class template \exposid{basic-format-string}}
\rSec2[format.fmt.string]{Class template \tcode{basic_format_string}}

\begin{codeblock}
template<class charT, class... Args>
struct @\exposid{basic-format-string}@ { // \expos
private:
basic_string_view<charT> @\exposid{str}@; // \expos
namespace std {
template<class charT, class... Args>
struct @\libglobal{basic_format_string}@ {
private:
basic_string_view<charT> @\exposidnc{str}@; // \expos

public:
template<class T> consteval @\exposid{basic-format-string}@(const T& s);
};
public:
template<class T> consteval basic_format_string(const T& s);

constexpr basic_string_view<charT> get() const noexcept { return @\exposid{str}@; }
};
}
\end{codeblock}

\begin{itemdecl}
template<class T> consteval @\exposid{basic-format-string}@(const T& s);
template<class T> consteval basic_format_string(const T& s);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -14662,7 +14664,7 @@
\indexlibraryglobal{format}%
\begin{itemdecl}
template<class... Args>
string format(@\exposid{format-string}@<Args...> fmt, Args&&... args);
string format(format_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -14677,7 +14679,7 @@
\indexlibraryglobal{format}%
\begin{itemdecl}
template<class... Args>
wstring format(@\exposid{wformat-string}@<Args...> fmt, Args&&... args);
wstring format(wformat_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -14692,7 +14694,7 @@
\indexlibraryglobal{format}%
\begin{itemdecl}
template<class... Args>
string format(const locale& loc, @\exposid{format-string}@<Args...> fmt, Args&&... args);
string format(const locale& loc, format_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -14707,7 +14709,7 @@
\indexlibraryglobal{format}%
\begin{itemdecl}
template<class... Args>
wstring format(const locale& loc, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
wstring format(const locale& loc, wformat_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -14743,7 +14745,7 @@
\indexlibraryglobal{format_to}%
\begin{itemdecl}
template<class Out, class... Args>
Out format_to(Out out, @\exposid{format-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, format_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -14758,7 +14760,7 @@
\indexlibraryglobal{format_to}%
\begin{itemdecl}
template<class Out, class... Args>
Out format_to(Out out, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, wformat_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -14773,7 +14775,7 @@
\indexlibraryglobal{format_to}%
\begin{itemdecl}
template<class Out, class... Args>
Out format_to(Out out, const locale& loc, @\exposid{format-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, const locale& loc, format_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand All @@ -14788,7 +14790,7 @@
\indexlibraryglobal{format_to}%
\begin{itemdecl}
template<class Out, class... Args>
Out format_to(Out out, const locale& loc, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
Out format_to(Out out, const locale& loc, wformat_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand Down Expand Up @@ -14846,17 +14848,17 @@
\begin{itemdecl}
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
@\exposid{format-string}@<Args...> fmt, Args&&... args);
format_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
@\exposid{wformat-string}@<Args...> fmt, Args&&... args);
wformat_string<Args...> fmt, Args&&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
const locale& loc, @\exposid{format-string}@<Args...> fmt,
const locale& loc, format_string<Args...> fmt,
Args&&... args);
template<class Out, class... Args>
format_to_n_result<Out> format_to_n(Out out, iter_difference_t<Out> n,
const locale& loc, @\exposid{wformat-string}@<Args...> fmt,
const locale& loc, wformat_string<Args...> fmt,
Args&&... args);
\end{itemdecl}

Expand Down Expand Up @@ -14902,13 +14904,13 @@
\indexlibraryglobal{formatted_size}%
\begin{itemdecl}
template<class... Args>
size_t formatted_size(@\exposid{format-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(format_string<Args...> fmt, Args&&... args);
template<class... Args>
size_t formatted_size(@\exposid{wformat-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(wformat_string<Args...> fmt, Args&&... args);
template<class... Args>
size_t formatted_size(const locale& loc, @\exposid{format-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(const locale& loc, format_string<Args...> fmt, Args&&... args);
template<class... Args>
size_t formatted_size(const locale& loc, @\exposid{wformat-string}@<Args...> fmt, Args&&... args);
size_t formatted_size(const locale& loc, wformat_string<Args...> fmt, Args&&... args);
\end{itemdecl}

\begin{itemdescr}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.