From Jason Turner

[fs.path.fmtr.funcs]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmphzzrlka5/{from.md → to.md} +50 -0
tmp/tmphzzrlka5/{from.md → to.md} RENAMED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### Formatting support functions <a id="fs.path.fmtr.funcs">[[fs.path.fmtr.funcs]]</a>
2
+
3
+ Formatting of paths uses formatting specifiers of the form
4
+
5
+ ``` bnf
6
+ path-format-spec:
7
+ fill-and-alignₒₚₜ widthₒₚₜ '?'ₒₚₜ 'g'ₒₚₜ
8
+ ```
9
+
10
+ where the productions *fill-and-align* and *width* are described in
11
+ [[format.string]]. If the `?` option is used then the path is formatted
12
+ as an escaped string [[format.string.escaped]].
13
+
14
+ ``` cpp
15
+ constexpr void set_debug_format();
16
+ ```
17
+
18
+ *Effects:* Modifies the state of the `formatter` to be as if the
19
+ *path-format-spec* parsed by the last call to `parse` contained the `?`
20
+ option.
21
+
22
+ ``` cpp
23
+ constexpr typename basic_format_parse_context<charT>::iterator
24
+ parse(basic_format_parse_context<charT>& ctx);
25
+ ```
26
+
27
+ *Effects:* Parses the format specifier as a *path-format-spec* and
28
+ stores the parsed specifiers in `*this`.
29
+
30
+ *Returns:* An iterator past the end of the *path-format-spec*.
31
+
32
+ ``` cpp
33
+ template<class FormatContext>
34
+ typename FormatContext::iterator
35
+ format(const filesystem::path& p, FormatContext& ctx) const;
36
+ ```
37
+
38
+ *Effects:* Let `s` be `p.generic_string<filesystem::path::value_type>()`
39
+ if the `g` option is used, otherwise `p.native()`. Writes `s` into
40
+ `ctx.out()`, adjusted according to the *path-format-spec*. If `charT` is
41
+ `char`, `path::value_type` is `wchar_t`, and the literal encoding is
42
+ UTF-8, then the escaped path is transcoded from the native encoding for
43
+ wide character strings to UTF-8 with maximal subparts of ill-formed
44
+ subsequences substituted with ‘U+fffd‘ replacement character per the
45
+ Unicode Standard, Chapter 3.9 ‘U+fffd‘ Substitution in Conversion. If
46
+ `charT` and `path::value_type` are the same then no transcoding is
47
+ performed. Otherwise, transcoding is *implementation-defined*.
48
+
49
+ *Returns:* An iterator past the end of the output range.
50
+