tmp/tmpn4mbgq9t/{from.md → to.md}
RENAMED
|
@@ -14,10 +14,21 @@ namespace std {
|
|
| 14 |
|
| 15 |
// [format.fmt.string], class template basic_format_string
|
| 16 |
template<class charT, class... Args>
|
| 17 |
struct basic_format_string;
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
template<class... Args>
|
| 20 |
using format_string = basic_format_string<char, type_identity_t<Args>...>;
|
| 21 |
template<class... Args>
|
| 22 |
using wformat_string = basic_format_string<wchar_t, type_identity_t<Args>...>;
|
| 23 |
|
|
@@ -83,10 +94,14 @@ namespace std {
|
|
| 83 |
size_t formatted_size(const locale& loc, wformat_string<Args...> fmt, Args&&... args);
|
| 84 |
|
| 85 |
// [format.formatter], formatter
|
| 86 |
template<class T, class charT = char> struct formatter;
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
// [format.formattable], concept formattable
|
| 89 |
template<class T, class charT>
|
| 90 |
concept formattable = see below;
|
| 91 |
|
| 92 |
template<class R, class charT>
|
|
@@ -134,26 +149,27 @@ namespace std {
|
|
| 134 |
template<ranges::input_range R, class charT>
|
| 135 |
requires (format_kind<R> != range_format::disabled) &&
|
| 136 |
formattable<ranges::range_reference_t<R>, charT>
|
| 137 |
struct formatter<R, charT> : range-default-formatter<format_kind<R>, R, charT> { };
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
// [format.arguments], arguments
|
| 140 |
// [format.arg], class template basic_format_arg
|
| 141 |
template<class Context> class basic_format_arg;
|
| 142 |
|
| 143 |
-
template<class Visitor, class Context>
|
| 144 |
-
decltype(auto) visit_format_arg(Visitor&& vis, basic_format_arg<Context> arg);
|
| 145 |
-
|
| 146 |
// [format.arg.store], class template format-arg-store
|
| 147 |
template<class Context, class... Args> class format-arg-store; // exposition only
|
| 148 |
|
| 149 |
template<class Context = format_context, class... Args>
|
| 150 |
format-arg-store<Context, Args...>
|
| 151 |
-
make_format_args(Args&
|
| 152 |
template<class... Args>
|
| 153 |
format-arg-store<wformat_context, Args...>
|
| 154 |
-
make_wformat_args(Args&
|
| 155 |
|
| 156 |
// [format.error], class format_error
|
| 157 |
class format_error;
|
| 158 |
}
|
| 159 |
```
|
|
|
|
| 14 |
|
| 15 |
// [format.fmt.string], class template basic_format_string
|
| 16 |
template<class charT, class... Args>
|
| 17 |
struct basic_format_string;
|
| 18 |
|
| 19 |
+
template<class charT> struct runtime-format-string { // exposition only
|
| 20 |
+
private:
|
| 21 |
+
basic_string_view<charT> str; // exposition only
|
| 22 |
+
public:
|
| 23 |
+
runtime-format-string(basic_string_view<charT> s) noexcept : str(s) {}
|
| 24 |
+
runtime-format-string(const runtime-format-string&) = delete;
|
| 25 |
+
runtime-format-string& operator=(const runtime-format-string&) = delete;
|
| 26 |
+
};
|
| 27 |
+
runtime-format-string<char> runtime_format(string_view fmt) noexcept { return fmt; }
|
| 28 |
+
runtime-format-string<wchar_t> runtime_format(wstring_view fmt) noexcept { return fmt; }
|
| 29 |
+
|
| 30 |
template<class... Args>
|
| 31 |
using format_string = basic_format_string<char, type_identity_t<Args>...>;
|
| 32 |
template<class... Args>
|
| 33 |
using wformat_string = basic_format_string<wchar_t, type_identity_t<Args>...>;
|
| 34 |
|
|
|
|
| 94 |
size_t formatted_size(const locale& loc, wformat_string<Args...> fmt, Args&&... args);
|
| 95 |
|
| 96 |
// [format.formatter], formatter
|
| 97 |
template<class T, class charT = char> struct formatter;
|
| 98 |
|
| 99 |
+
// [format.formatter.locking], formatter locking
|
| 100 |
+
template<class T>
|
| 101 |
+
constexpr bool enable_nonlocking_formatter_optimization = false;
|
| 102 |
+
|
| 103 |
// [format.formattable], concept formattable
|
| 104 |
template<class T, class charT>
|
| 105 |
concept formattable = see below;
|
| 106 |
|
| 107 |
template<class R, class charT>
|
|
|
|
| 149 |
template<ranges::input_range R, class charT>
|
| 150 |
requires (format_kind<R> != range_format::disabled) &&
|
| 151 |
formattable<ranges::range_reference_t<R>, charT>
|
| 152 |
struct formatter<R, charT> : range-default-formatter<format_kind<R>, R, charT> { };
|
| 153 |
|
| 154 |
+
template<ranges::input_range R>
|
| 155 |
+
requires (format_kind<R> != range_format::disabled)
|
| 156 |
+
constexpr bool enable_nonlocking_formatter_optimization<R> = false;
|
| 157 |
+
|
| 158 |
// [format.arguments], arguments
|
| 159 |
// [format.arg], class template basic_format_arg
|
| 160 |
template<class Context> class basic_format_arg;
|
| 161 |
|
|
|
|
|
|
|
|
|
|
| 162 |
// [format.arg.store], class template format-arg-store
|
| 163 |
template<class Context, class... Args> class format-arg-store; // exposition only
|
| 164 |
|
| 165 |
template<class Context = format_context, class... Args>
|
| 166 |
format-arg-store<Context, Args...>
|
| 167 |
+
make_format_args(Args&... fmt_args);
|
| 168 |
template<class... Args>
|
| 169 |
format-arg-store<wformat_context, Args...>
|
| 170 |
+
make_wformat_args(Args&... args);
|
| 171 |
|
| 172 |
// [format.error], class format_error
|
| 173 |
class format_error;
|
| 174 |
}
|
| 175 |
```
|