Skip to content

Commit 405d4ec

Browse files
committed
Merge 2023-02 LWG Motion 9
P2713R1 Escaping improvements in std::format
2 parents 3e04431 + e38ea31 commit 405d4ec

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

source/utilities.tex

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15963,12 +15963,20 @@
1596315963
\begin{itemize}
1596415964
\item
1596515965
\placeholder{CE} is UTF-8, UTF-16, or UTF-32 and
15966-
\placeholder{C} corresponds to either
15967-
a Unicode scalar value whose Unicode property \tcode{General_Category}
15968-
has a value in the groups \tcode{Separator} (\tcode{Z}) or \tcode{Other} (\tcode{C}) or to
15969-
a Unicode scalar value with the Unicode property \tcode{Grapheme_Extend=Yes},
15966+
\placeholder{C} corresponds to a Unicode scalar value
15967+
whose Unicode property \tcode{General_Category} has a value in the groups
15968+
\tcode{Separator} (\tcode{Z}) or \tcode{Other} (\tcode{C}),
1597015969
as described by \UAX{44} of the Unicode Standard, or
1597115970

15971+
\item
15972+
\placeholder{CE} is UTF-8, UTF-16, or UTF-32 and
15973+
\placeholder{C} corresponds to a Unicode scalar value
15974+
with the Unicode property \tcode{Grapheme_Extend=Yes}
15975+
as described by \UAX{44} of the Unicode Standard and
15976+
\placeholder{C} is not immediately preceded in \placeholder{S} by
15977+
a character \placeholder{P} appended to \placeholder{E}
15978+
without translation to an escape sequence, or
15979+
1597215980
\item
1597315981
\placeholder{CE} is neither UTF-8, UTF-16, nor UTF-32 and
1597415982
\placeholder{C} is one of an implementation-defined set
@@ -16050,7 +16058,8 @@
1605016058
then \placeholder{C} is appended unchanged.
1605116059
\end{itemize}
1605216060

16053-
%% FIXME: Example is incomplete; s2 and s6 are missing below;
16061+
%% FIXME: Example is incomplete; s2 and s6 from P2286R8
16062+
%% and s8 (which should be s9) from P2713R1 are missing below;
1605416063
%% FIXME: their Unicode characters are not available in our font (Latin Modern).
1605516064
\begin{example}
1605616065
\begin{codeblock}
@@ -16062,6 +16071,8 @@
1606216071
string s4 = format("[{:?}]", string("\0 \n \t \x02 \x1b", 9));
1606316072
// \tcode{s4} has value: \tcode{["\textbackslash u\{0\} \textbackslash n \textbackslash t \textbackslash u\{2\} \textbackslash u\{1b\}"]}
1606416073
string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8, \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}("]}
16074+
string s7 = format("[{:?}]", "\u0301"); // \tcode{s7} has value: \tcode{["\textbackslash u{301}"]}
16075+
string s8 = format("[{:?}]", "\\\u0301"); // \tcode{s8} has value: \tcode{["\textbackslash \textbackslash \textbackslash u{301}"]}
1606516076
\end{codeblock}
1606616077
\end{example}
1606716078

0 commit comments

Comments
 (0)