Skip to content

Commit f818270

Browse files
jensmaurertkoeppe
authored andcommitted
[charconv.syn] Use higher-level indexing macros
This avoids false positives with the automated checks.
1 parent e9604bc commit f818270

File tree

1 file changed

+14
-28
lines changed

1 file changed

+14
-28
lines changed

source/text.tex

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,18 @@
3636
\indexheader{charconv}%
3737
\begin{codeblock}
3838
namespace std {
39-
@%
40-
\indexlibraryglobal{chars_format}%
41-
\indexlibrarymember{scientific}{chars_format}%
42-
\indexlibrarymember{fixed}{chars_format}%
43-
\indexlibrarymember{hex}{chars_format}%
44-
\indexlibrarymember{general}{chars_format}%
45-
@ // floating-point format for primitive numerical conversion
46-
enum class chars_format {
47-
scientific = @\unspec@,
48-
fixed = @\unspec@,
49-
hex = @\unspec@,
50-
general = fixed | scientific
39+
// floating-point format for primitive numerical conversion
40+
enum class @\libglobal{chars_format}@ {
41+
@\libmember{scientific}{chars_format}@ = @\unspec@,
42+
@\libmember{fixed}{chars_format}@ = @\unspec@,
43+
@\libmember{hex}{chars_format}@ = @\unspec@,
44+
@\libmember{general}{chars_format}@ = fixed | scientific
5145
};
52-
@%
53-
\indexlibraryglobal{to_chars_result}%
54-
\indexlibrarymember{ptr}{to_chars_result}%
55-
\indexlibrarymember{ec}{to_chars_result}
56-
@
46+
5747
// \ref{charconv.to.chars}, primitive numerical output conversion
58-
struct to_chars_result { // freestanding
59-
char* ptr;
60-
errc ec;
48+
struct @\libglobal{to_chars_result}@ { // freestanding
49+
char* @\libmember{ptr}{to_chars_result}@;
50+
errc @\libmember{ec}{to_chars_result}@;
6151
friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
6252
constexpr explicit operator bool() const noexcept { return ec == errc{}; }
6353
};
@@ -73,15 +63,11 @@
7363
@\placeholder{floating-point-type}@ value, chars_format fmt);
7464
to_chars_result to_chars(char* first, char* last, // freestanding-deleted
7565
@\placeholder{floating-point-type}@ value, chars_format fmt, int precision);
76-
@%
77-
\indexlibraryglobal{from_chars_result}%
78-
\indexlibrarymember{ptr}{from_chars_result}%
79-
\indexlibrarymember{ec}{from_chars_result}
80-
@
66+
8167
// \ref{charconv.from.chars}, primitive numerical input conversion
82-
struct from_chars_result { // freestanding
83-
const char* ptr;
84-
errc ec;
68+
struct @\libglobal{from_chars_result}@ { // freestanding
69+
const char* @\libmember{ptr}{from_chars_result}@;
70+
errc @\libmember{ec}{from_chars_result}@;
8571
friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
8672
constexpr explicit operator bool() const noexcept { return ec == errc{}; }
8773
};

0 commit comments

Comments
 (0)