Skip to content

Commit 9355f5d

Browse files
jensmaurertkoeppe
authored andcommitted
[re.regex] Avoid duplicate list of constants (#1984)
Shorten the synopsis and remove [re.regex.const].
1 parent 7b130cf commit 9355f5d

File tree

2 files changed

+15
-45
lines changed

2 files changed

+15
-45
lines changed

source/regex.tex

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,29 +1336,18 @@
13361336
using flag_type = regex_constants::syntax_option_type;
13371337
using locale_type = typename traits::locale_type;
13381338

1339-
// \ref{re.regex.const}, constants
1340-
static constexpr regex_constants::syntax_option_type
1341-
icase = regex_constants::icase;
1342-
static constexpr regex_constants::syntax_option_type
1343-
nosubs = regex_constants::nosubs;
1344-
static constexpr regex_constants::syntax_option_type
1345-
optimize = regex_constants::optimize;
1346-
static constexpr regex_constants::syntax_option_type
1347-
collate = regex_constants::collate;
1348-
static constexpr regex_constants::syntax_option_type
1349-
ECMAScript = regex_constants::ECMAScript;
1350-
static constexpr regex_constants::syntax_option_type
1351-
basic = regex_constants::basic;
1352-
static constexpr regex_constants::syntax_option_type
1353-
extended = regex_constants::extended;
1354-
static constexpr regex_constants::syntax_option_type
1355-
awk = regex_constants::awk;
1356-
static constexpr regex_constants::syntax_option_type
1357-
grep = regex_constants::grep;
1358-
static constexpr regex_constants::syntax_option_type
1359-
egrep = regex_constants::egrep;
1360-
static constexpr regex_constants::syntax_option_type
1361-
multiline = regex_constants::multiline;
1339+
// \ref{re.synopt}, constants
1340+
static constexpr flag_type icase = regex_constants::icase;
1341+
static constexpr flag_type nosubs = regex_constants::nosubs;
1342+
static constexpr flag_type optimize = regex_constants::optimize;
1343+
static constexpr flag_type collate = regex_constants::collate;
1344+
static constexpr flag_type ECMAScript = regex_constants::ECMAScript;
1345+
static constexpr flag_type basic = regex_constants::basic;
1346+
static constexpr flag_type extended = regex_constants::extended;
1347+
static constexpr flag_type awk = regex_constants::awk;
1348+
static constexpr flag_type grep = regex_constants::grep;
1349+
static constexpr flag_type egrep = regex_constants::egrep;
1350+
static constexpr flag_type multiline = regex_constants::multiline;
13621351

13631352
// \ref{re.regex.construct}, construct/copy/destroy
13641353
basic_regex();
@@ -1416,28 +1405,6 @@
14161405
}
14171406
\end{codeblock}
14181407

1419-
\rSec2[re.regex.const]{\tcode{basic_regex} constants}
1420-
\indexlibrary{\idxcode{basic_regex}!constants}%
1421-
1422-
\begin{codeblock}
1423-
static constexpr regex_constants::syntax_option_type icase = regex_constants::icase;
1424-
static constexpr regex_constants::syntax_option_type nosubs = regex_constants::nosubs;
1425-
static constexpr regex_constants::syntax_option_type optimize = regex_constants::optimize;
1426-
static constexpr regex_constants::syntax_option_type collate = regex_constants::collate;
1427-
static constexpr regex_constants::syntax_option_type ECMAScript = regex_constants::ECMAScript;
1428-
static constexpr regex_constants::syntax_option_type basic = regex_constants::basic;
1429-
static constexpr regex_constants::syntax_option_type extended = regex_constants::extended;
1430-
static constexpr regex_constants::syntax_option_type awk = regex_constants::awk;
1431-
static constexpr regex_constants::syntax_option_type grep = regex_constants::grep;
1432-
static constexpr regex_constants::syntax_option_type egrep = regex_constants::egrep;
1433-
static constexpr regex_constants::syntax_option_type multiline = regex_constants::multiline;
1434-
\end{codeblock}
1435-
1436-
\pnum
1437-
\indexlibrary{\idxcode{basic_regex}!constants}%
1438-
The static constant members are provided as synonyms for the constants
1439-
declared in namespace \tcode{regex_constants}.
1440-
14411408
\rSec2[re.regex.construct]{\tcode{basic_regex} constructors}
14421409

14431410
\indexlibrary{\idxcode{basic_regex}!constructor}%

source/xrefdelta.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
% Contents of [util.smartptr] was integrated into the parent.
5353
\removedxref{util.smartptr}
5454

55+
% Avoid duplication with synopsis.
56+
\movedxref{re.regex.const}{re.regex}
57+
5558
% Deprecated free-function atomic access to shared pointers
5659
\movedxref{util.smartptr.shared.atomic}{depr.util.smartptr.shared.atomic}
5760

0 commit comments

Comments
 (0)