LoginSignup
0
0

More than 1 year has passed since last update.

32.4 Namespace std::regex_constants [re.const] C++N4910:2022 (699) p1632.cpp

Posted at

はじめに(Introduction)

N4910 Working Draft, Standard for Programming Language C++

C++ n4910は、ISO/IEC JTC1 SC22 WG21の作業原案(Working Draft)です。
公式のISO/IEC 14882原本ではありません。
ISO/IEC JTC1 SC22 のWG21を含むいくつかのWGでは、可能な限り作業文書を公開し、幅広い意見を求めています。

ISO/IEC JTC1 SC7からISO/IEC JTC1 SC22リエゾンとして、2000年頃、C/C++の品質向上に貢献しようとした活動をしていたことがあります。その頃は、まだISO/IEC TS 17961の原案が出る前です。Cの精神が優勢で、セキュリティ対策は補助的な位置付けでした。ISO/IEC TS 17961の制定と、C/C++のライブラリ類の見直しと、C++の進化はどんどん進んでいきます。 

進化の具合が、どちらに行こうとしているかは、コンパイルて実行させてみないとわかりません。C/C++の規格案の電子ファイルは、そのままコンパイルできる形式であるとよいと主張してきました。MISRA-C/C++, CERTC/C++でも同様です。MISRA-C/C++は、Example Suiteという形で、コード断片をコンパイルできる形で提供するようになりました。

一連の記事はコード断片をコンパイルできる形にする方法を検討してコンパイル、リンク、実行して、規格案の原文と処理系(g++, Clang++)との違いを確認し、技術内容を検討し、ISO/IEC JTC1 SC22 WG21にフィードバックするために用います。
また、CERT C++, MISRA C++等のコーディング標準のコード断片をコンパイルする際の参考にさせていただこうと考えています。CERT C++, MISRA C++が標準化の動きとの時間的なずれがあれば確認できれば幸いです。また、boostライブラリとの関連、Linux OS, 箱庭プロジェクト、g++(GCC), clang++(LLVM)との関係も調査中です。
何か、抜け漏れ、耳より情報がありましたらおしらせくださると幸いです。

背景(back ground)

C/C++でコンパイルエラーが出ると、途方にくれることがしばしばあります。
何回かに1回は、該当するエラーが検索できます。
ただ、条件が違っていて、そこでの修正方法では目的を達成しないこともしばしばです。いろいろな条件のコンパイルエラーとその対応方法について、広く記録することによって、いつか同じエラーに遭遇した時にやくに立つことを目指しています。

この半年の間で、三度、自分のネットでの記録に助けられたことがあります。
また過去に解決できなかった記録を10種類以上、最近になって解決できたことがあります。それは、主に次の3つの情報に基づいています。

cpprefjp - C++日本語リファレンス

コンパイラの実装状況

また
https://researchmap.jp/joub9b3my-1797580/#_1797580
に記載したサイトのお世話になっています。

作業方針(sequence)

Clang++では-std=c++03, C++2bの2種類
g++では-std=c++03, c++2bの2種類
でコンパイルし、

1)コンパイルエラーを収集する。
2)コンパイルエラーをなくす方法を検討する。
コンパイルエラーになる例を示すだけが目的のコードは、コンパイルエラーをなくすのではなく、コンパイルエラーの種類を収集するだけにする。
文法を示すのが目的のコード場合に、コンパイルエラーをなくすのに手間がかかる場合は、順次作業します。
3)リンクエラーをなくす方法を検討する。
文法を示すのが目的のコード場合に、リンクエラーをなくすのに手間がかかる場合は、順次作業します。
4)意味のある出力を作る。
コンパイル、リンクが通っても、意味のある出力を示そうとすると、コンパイル・リンクエラーが出て収拾できそうにない場合がある。順次作業します。

1)だけのものから4)まで進んだものと色々ある状態です。一歩でも前に進むご助言をお待ちしています。「検討事項」の欄に現状を記録するようにしています。

C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list

bash
$ docker run -v /Users/ogawakiyoshi/n4910:/Users/ogawakiyoshi/n4910 -it kaizenjapan/n4910 /bin/bash

C++N4741, 2018 Standard Working Draft on ISO/IEC 14882 sample code compile list

C++N4606, 2016符号断片編纂一覧(example code compile list)

C++N4606, 2016 Working Draft 2016, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/

C++N3242, 2011 sample code compile list on clang++ and g++

読書感想文

CコンパイラによるC言語規格の読書感想文として掲載しています。

コンパイル実験が、C++N4910に対する、G++とClang++による感想文だということご理解いただけると幸いです。

読書感想文は人間かAIだけが作るものとは限りません。
本(電子書籍を含む)を入力として、その内容に対する文字列を読書感想文として受け止めましょう。
元の文章をあり方、コンパイルできるように電子化しておくこと、コンパイラが解釈可能な断片の作り方など。

個人開発

Cコンパイラの試験を一人でもくもくとやっているのは個人開発の一つの姿です。

<この項は書きかけです。順次追記します。>

編纂器(Compiler)

clang++ --version

20220826 以前

Debian clang version 14.0.5-++20220610033153+c12386ae247c-1~exp1~20220610153237.151
Target: x86_64-pc-linux-gnu, Thread model: posix, InstalledDir: /usr/bin

20220827 以降

Debian clang version 14.0.6-++20220622053050+f28c006a5895-1~exp1~20220622173135.152
Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin

g++- --version

g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

32.4 Namespace std::regex_constants [re.const] C++N4910:2022 (699) p1632.cpp

算譜(source code)

p1632.cpp
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "32.4 Namespace std::regex_constants [re.const] C++N4910:2022 (699) p1632.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. OGAWA Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

#include "N4910.h"

using namespace std;

// 32.4.1 General [re.const.general]
//  The namespace std::regex_constants holds symbolic constants used by the regular expression library. This namespace provides three types, syntax_option_type, match_flag_type, and error_type, along with several constants of these types.
// 32.4.2 Bitmask type syntax_option_type [re.synopt]
namespace std::regex_constants {
using syntax_option_type = T1;
inline constexpr syntax_option_type icase = unspecified;
inline constexpr syntax_option_type nosubs = unspecified;
inline constexpr syntax_option_type optimize = unspecified;
inline constexpr syntax_option_type collate = unspecified;
inline constexpr syntax_option_type ECMAScript = unspecified;
inline constexpr syntax_option_type basic = unspecified;
inline constexpr syntax_option_type extended = unspecified;
inline constexpr syntax_option_type awk = unspecified;
inline constexpr syntax_option_type grep = unspecified;
inline constexpr syntax_option_type egrep = unspecified;
inline constexpr syntax_option_type multiline = unspecified;
}
// The type syntax_option_type is an implementation-defined bitmask type (16.3.3.3.4). Setting its elements has the effects listed in Table 133. A valid value of type syntax_option_type shall have at most one of the grammar elements ECMAScript, basic, extended, awk, grep, egrep, set. If no grammar element is set, the default grammar is ECMAScript.
// 32.4.3 Bitmask type match_flag_type [re.matchflag]
namespace std::regex_constants {
using match_flag_type = T2;
inline constexpr match_flag_type match_default = {};
inline constexpr match_flag_type match_not_bol = unspecified;
inline constexpr match_flag_type match_not_eol = unspecified;
inline constexpr match_flag_type match_not_bow = unspecified;
inline constexpr match_flag_type match_not_eow = unspecified;
inline constexpr match_flag_type match_any = unspecified;
inline constexpr match_flag_type match_not_null = unspecified;
inline constexpr match_flag_type match_continuous = unspecified;
inline constexpr match_flag_type match_prev_avail = unspecified;
inline constexpr match_flag_type format_default = {};
inline constexpr match_flag_type format_sed = unspecified;
inline constexpr match_flag_type format_no_copy = unspecified;
inline constexpr match_flag_type format_first_only = unspecified;
}
//  The type match_flag_type is an implementation-defined bitmask type (16.3.3.3.4). The constants of that type, except for match_default and format_default, are bitmask elements. The match_default and format_default constants are empty bitmasks. Matching a regular expression against a sequence of characters [first, last) proceeds according to the rules of the grammar specified for the regular expression object, modified according to the effects listed in Table 134 for any bitmask elements set.
// Table 133: syntax_option_type effects [tab:re.synopt]
//    Element Effect(s) if set
//     icase Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case.
//    nosubs Specifies that no sub-expressions shall be considered to be marked, so that when a regular expression is matched against a character container sequence, no sub-expression matches shall be stored in the supplied match_results object.
//   optimize Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output.
//    collate Specifies that character ranges of the form "[a-b]" shall be locale sensitive.
//    ECMAScript Specifies that the grammar recognized by the regular expression engine shall be that used by ECMAScript in ECMA-262, as modified in 32.12.
// See also: ECMA-262 15.10
//    basic Specifies that the grammar recognized by the regular expression engine shall be that used by basic regular expressions in POSIX.
// See also: POSIX, Base Definitions and Headers, Section 9.3
//    extended Specifies that the grammar recognized by the regular expression engine shall be that used by extended regular expressions in POSIX.
// See also: POSIX, Base Definitions and Headers, Section 9.4
//    awk Specifies that the grammar recognized by the regular expression // engine shall be that used by the utility awk in POSIX.
//    grep Specifies that the grammar recognized by the regular expression // engine shall be that used by the utility grep in POSIX.
//    egrep Specifies that the grammar recognized by the regular expression engine shall be that used by the utility grep when given the -E option in POSIX.
//    multiline Specifies that ^ shall match the beginning of a line and $ shall match the end of a line, if the ECMAScript engine is selected.
//  Table 134: regex_constants::match_flag_type effects when obtaining a match against a character container sequence [first, last).
//    Element Effect(s) if set
//     match_not_bol The first character in the sequence [first, last) shall be treated as though it is not at the beginning of a line, so the character ^ in the regular expression shall not match [first, first).
//    match_not_eol The last character in the sequence [first, last) shall be treated as though it is not at the end of a line, so the character "$" in the regular expression shall not match [last, last).
//    match_not_bow The expression "\\b" shall not match the sub-sequence [first, first).
//   match_not_eow The expression "\\b" shall not match the sub-sequence [last, last).
//   match_any If more than one match is possible then any match is an acceptable result.
//   match_not_null The expression shall not match an empty sequence.
//   match_continuous The expression shall only match a sub-sequence that begins at first.
//   match_prev_avail --first is a valid iterator position. When this flag is set the flags match_- not_bol and match_not_bow shall be ignored by the regular expression algorithms (32.10) and iterators (32.11).
//    format_default
// When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the ECMAScript replace function in ECMA-262, part 15.5.4.11 String.prototype.replace. In addition, during search and replace operations all non-overlapping occurrences of the regular expression shall be located and replaced, and sections of the input that did not match the expression shall be copied unchanged to the output string.
//  Table 134: regex_constants::match_flag_type effects when obtaining a match against a character
// container sequence [first, last). (continued)
// 32.4.4 Implementation-defined error_type [re.err]
namespace std::regex_constants {
using error_type = T3;
inline constexpr error_type error_collate = unspecified;
inline constexpr error_type error_ctype = unspecified;
inline constexpr error_type error_escape = unspecified;
inline constexpr error_type error_backref = unspecified;
inline constexpr error_type error_brack = unspecified;
inline constexpr error_type error_paren = unspecified;
inline constexpr error_type error_brace = unspecified;
inline constexpr error_type error_badbrace = unspecified;
inline constexpr error_type error_range = unspecified;
inline constexpr error_type error_space = unspecified;
inline constexpr error_type error_badrepeat = unspecified;
inline constexpr error_type error_complexity = unspecified;
inline constexpr error_type error_stack = unspecified;
}
// Element Effect(s) if set
// format_sed When a regular expression match is to be replaced by a new string, the new string shall be constructed using the rules used by the sed utility in POSIX.
// format_no_copy During a search and replace operation, sections of the character container sequence being searched that do not match the regular expression shall not be copied to the output string.
// format_first_only When specified during a search and replace operation, only the first occur- rence of the regular expression shall be replaced.
//  The type error_type is an implementation-defined enumerated type (16.3.3.3.3). Values of type error_type represent the error conditions described in Table 135:
// Table 135: error_type values in the C locale[tab:re.err]
// Value Error condition
// error_collate The expression contains an invalid collating element name.
// error_ctype The expression contains an invalid character class name.
// error_escape The expression contains an invalid escaped character, or a trailing escape.
// error_backref The expression contains an invalid back reference.
// error_brack The expression contains mismatched [ and ].
// error_paren The expression contains mismatched ( and ).
// error_brace The expression contains mismatched { and }
// error_badbrace The expression contains an invalid range in a {} expression.
// error_range The expression contains an invalid character range, such as [b-a] in most encodings.
// error_space There is insufficient memory to convert the expression into a finite state machine.
// error_badrepeat One of *?+{ is not preceded by a valid regular expression.
// error_complexity The complexity of an attempted match against a regular expression exceeds a pre-set level.
// error_stack There is insufficient memory to determine whether the regular expression matches the specified character sequence.
int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}

編纂・実行結果(compile and go)

bash
$ clang++ p1632.cpp -std=03 -o p1632l -I. -Wall
In file included from p1632.cpp:10:
In file included from ./N4910.h:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/atomic:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
 ^
p1632.cpp:17:14: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
namespace std::regex_constants {
             ^~~~~~~~~~~~~~~~~
              { namespace regex_constants
p1632.cpp:18:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using syntax_option_type = T1;
                           ^
p1632.cpp:18:28: error: unknown type name 'T1'
p1632.cpp:19:8: error: unknown type name 'constexpr'
inline constexpr syntax_option_type icase = unspecified;
       ^
p1632.cpp:19:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type icase = unspecified;
^
p1632.cpp:19:36: error: expected ';' after top level declarator
inline constexpr syntax_option_type icase = unspecified;
                                   ^
                                   ;
p1632.cpp:20:8: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
       ^
p1632.cpp:20:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
^
p1632.cpp:20:36: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                   ^
                                   ;
p1632.cpp:20:66: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                 ^
p1632.cpp:20:59: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                          ^
p1632.cpp:20:94: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                             ^
                                                                                             ;
p1632.cpp:20:126: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                             ^
p1632.cpp:20:119: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                      ^
p1632.cpp:20:154: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                         ^
                                                                                                                                                         ;
p1632.cpp:20:185: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                        ^
p1632.cpp:20:178: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                 ^
p1632.cpp:20:213: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                    ^
                                                                                                                                                                                                                    ;
p1632.cpp:20:247: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                      ^
p1632.cpp:20:240: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                               ^
p1632.cpp:20:275: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                  ^
                                                                                                                                                                                                                                                                                  ;
p1632.cpp:20:304: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                               ^
p1632.cpp:20:297: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                        ^
p1632.cpp:20:332: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                           ^
                                                                                                                                                                                                                                                                                                                                           ;
p1632.cpp:20:364: error: unknown type name 'constexpr'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                                                           ^
p1632.cpp:20:357: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                                                    ^
p1632.cpp:20:392: error: expected ';' after top level declarator
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                                                                                       ^
                                                                                                                                                                                                                                                                                                                                                                                                       ;
p1632.cpp:21:8: error: unknown type name 'constexpr'
inline constexpr syntax_option_type grep = unspecified;
       ^
p1632.cpp:21:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr syntax_option_type grep = unspecified;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
11 warnings and 20 errors generated.
$ clang++ p1632.cpp -std=2b -o p1632l -I. -Wall
p1632.cpp:18:28: error: unknown type name 'T1'
using syntax_option_type = T1;
                           ^
p1632.cpp:19:18: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type icase = unspecified;
                 ^
p1632.cpp:19:45: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type icase = unspecified;
                                            ^
p1632.cpp:20:18: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                 ^
p1632.cpp:20:46: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                             ^
p1632.cpp:20:76: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                           ^
p1632.cpp:20:106: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                         ^
p1632.cpp:20:136: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                       ^
p1632.cpp:20:165: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                    ^
p1632.cpp:20:195: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                  ^
p1632.cpp:20:227: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                  ^
p1632.cpp:20:257: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                ^
p1632.cpp:20:284: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                           ^
p1632.cpp:20:314: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                         ^
p1632.cpp:20:344: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                                       ^
p1632.cpp:20:374: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                                                                     ^
p1632.cpp:20:399: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
                                                                                                                                                                                                                                                                                                                                                                                                              ^
p1632.cpp:21:18: error: unknown type name 'syntax_option_type'
inline constexpr syntax_option_type grep = unspecified;
                 ^
p1632.cpp:21:44: error: use of undeclared identifier 'unspecified'
inline constexpr syntax_option_type grep = unspecified;
                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p1632.cpp -std=03 -o p1632g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1632.cpp:10:
/usr/local/include/c++/12.1.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   32 | #error This file requires compiler and library support \
      |  ^~~~~
p1632.cpp:19:8: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
   19 | inline constexpr syntax_option_type icase = unspecified;
      |        ^~~~~~~~~
p1632.cpp:18:7: error: expected nested-name-specifier before 'syntax_option_type'
   18 | using syntax_option_type = T1;
      |       ^~~~~~~~~~~~~~~~~~
p1632.cpp:19:8: error: 'constexpr' does not name a type
   19 | inline constexpr syntax_option_type icase = unspecified;
      |        ^~~~~~~~~
p1632.cpp:19:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:8: error: 'constexpr' does not name a type
   20 | inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |        ^~~~~~~~~
p1632.cpp:20:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:66: error: 'constexpr' does not name a type
   20 | inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                  ^~~~~~~~~
p1632.cpp:20:66: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:126: error: 'constexpr' does not name a type
   20 | inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                              ^~~~~~~~~
p1632.cpp:20:126: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:185: error: 'constexpr' does not name a type
   20 | s = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~

p1632.cpp:20:185: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:247: error: 'constexpr' does not name a type
   20 | = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~

p1632.cpp:20:247: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:304: error: 'constexpr' does not name a type
   20 | e = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~

p1632.cpp:20:304: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:20:364: error: 'constexpr' does not name a type
   20 | ipt = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~

p1632.cpp:20:364: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:21:8: error: 'constexpr' does not name a type
   21 | inline constexpr syntax_option_type grep = unspecified;
      |        ^~~~~~~~~
p1632.cpp:21:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:22:8: error: 'constexpr' does not name a type
   22 | inline constexpr syntax_option_type egrep = unspecified;
      |        ^~~~~~~~~
p1632.cpp:22:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:23:8: error: 'constexpr' does not name a type
   23 | inline constexpr syntax_option_type multiline = unspecified;
      |        ^~~~~~~~~
p1632.cpp:23:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:28:7: error: expected nested-name-specifier before 'match_flag_type'
   28 | using match_flag_type = T2;
      |       ^~~~~~~~~~~~~~~
p1632.cpp:29:8: error: 'constexpr' does not name a type
   29 | inline constexpr match_flag_type match_default = {};
      |        ^~~~~~~~~
p1632.cpp:29:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:30:8: error: 'constexpr' does not name a type
   30 | inline constexpr match_flag_type match_not_bol = unspecified;
      |        ^~~~~~~~~
p1632.cpp:30:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:31:8: error: 'constexpr' does not name a type
   31 | inline constexpr match_flag_type match_not_eol = unspecified;
      |        ^~~~~~~~~
p1632.cpp:31:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:32:8: error: 'constexpr' does not name a type
   32 | inline constexpr match_flag_type match_not_bow = unspecified;
      |        ^~~~~~~~~
p1632.cpp:32:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:33:8: error: 'constexpr' does not name a type
   33 | inline constexpr match_flag_type match_not_eow = unspecified;
      |        ^~~~~~~~~
p1632.cpp:33:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:34:8: error: 'constexpr' does not name a type
   34 | inline constexpr match_flag_type match_any = unspecified;
      |        ^~~~~~~~~
p1632.cpp:34:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:35:8: error: 'constexpr' does not name a type
   35 | inline constexpr match_flag_type match_not_null = unspecified;
      |        ^~~~~~~~~
p1632.cpp:35:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:36:8: error: 'constexpr' does not name a type
   36 | inline constexpr match_flag_type match_continuous = unspecified;
      |        ^~~~~~~~~
p1632.cpp:36:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:37:8: error: 'constexpr' does not name a type
   37 | inline constexpr match_flag_type match_prev_avail = unspecified;
      |        ^~~~~~~~~
p1632.cpp:37:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:38:8: error: 'constexpr' does not name a type
   38 | inline constexpr match_flag_type format_default = {};
      |        ^~~~~~~~~
p1632.cpp:38:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:39:8: error: 'constexpr' does not name a type
   39 | inline constexpr match_flag_type format_sed = unspecified;
      |        ^~~~~~~~~
p1632.cpp:39:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:40:8: error: 'constexpr' does not name a type
   40 | inline constexpr match_flag_type format_no_copy = unspecified;
      |        ^~~~~~~~~
p1632.cpp:40:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:41:8: error: 'constexpr' does not name a type
   41 | inline constexpr match_flag_type format_first_only = unspecified;
      |        ^~~~~~~~~
p1632.cpp:41:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:76:7: error: expected nested-name-specifier before 'error_type'
   76 | using error_type = T3;
      |       ^~~~~~~~~~
p1632.cpp:77:8: error: 'constexpr' does not name a type
   77 | inline constexpr error_type error_collate = unspecified;
      |        ^~~~~~~~~
p1632.cpp:77:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:78:9: error: 'constexpr' does not name a type
   78 |  inline constexpr error_type error_ctype = unspecified;
      |         ^~~~~~~~~
p1632.cpp:78:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:79:9: error: 'constexpr' does not name a type
   79 |  inline constexpr error_type error_escape = unspecified;
      |         ^~~~~~~~~
p1632.cpp:79:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:80:9: error: 'constexpr' does not name a type
   80 |  inline constexpr error_type error_backref = unspecified;
      |         ^~~~~~~~~
p1632.cpp:80:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:81:9: error: 'constexpr' does not name a type
   81 |  inline constexpr error_type error_brack = unspecified;
      |         ^~~~~~~~~
p1632.cpp:81:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:82:9: error: 'constexpr' does not name a type
   82 |  inline constexpr error_type error_paren = unspecified;
      |         ^~~~~~~~~
p1632.cpp:82:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:83:9: error: 'constexpr' does not name a type
   83 |  inline constexpr error_type error_brace = unspecified;
      |         ^~~~~~~~~
p1632.cpp:83:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:84:9: error: 'constexpr' does not name a type
   84 |  inline constexpr error_type error_badbrace = unspecified;
      |         ^~~~~~~~~
p1632.cpp:84:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:85:9: error: 'constexpr' does not name a type
   85 |  inline constexpr error_type error_range = unspecified;
      |         ^~~~~~~~~
p1632.cpp:85:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:86:9: error: 'constexpr' does not name a type
   86 |  inline constexpr error_type error_space = unspecified;
      |         ^~~~~~~~~
p1632.cpp:86:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:87:9: error: 'constexpr' does not name a type
   87 |  inline constexpr error_type error_badrepeat = unspecified;
      |         ^~~~~~~~~
p1632.cpp:87:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:88:9: error: 'constexpr' does not name a type
   88 |  inline constexpr error_type error_complexity = unspecified;
      |         ^~~~~~~~~
p1632.cpp:88:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1632.cpp:89:9: error: 'constexpr' does not name a type
   89 |  inline constexpr error_type error_stack = unspecified;
      |         ^~~~~~~~~
p1632.cpp:89:9: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'

$ g++ p1632.cpp -std=2b -o p1632g -I. -Wall
p1632.cpp:18:28: error: 'T1' does not name a type
   18 | using syntax_option_type = T1;
      |                            ^~
p1632.cpp:19:18: error: 'syntax_option_type' does not name a type
   19 | inline constexpr syntax_option_type icase = unspecified;
      |                  ^~~~~~~~~~~~~~~~~~
p1632.cpp:20:18: error: 'syntax_option_type' does not name a type
   20 | inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                  ^~~~~~~~~~~~~~~~~~
p1632.cpp:20:76: error: 'syntax_option_type' does not name a type
   20 | inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                            ^~~~~~~~~~~~~~~~~~
p1632.cpp:20:136: error: 'syntax_option_type' does not name a type
   20 | inline constexpr syntax_option_type nosubs = unspecified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                        ^~~~~~~~~~~~~~~~~~
p1632.cpp:20:195: error: 'syntax_option_type' does not name a type
   20 | ified; inline constexpr syntax_option_type optimize = unspecified; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~~~~~~~~~~

p1632.cpp:20:257: error: 'syntax_option_type' does not name a type
   20 | ied; inline constexpr syntax_option_type collate = unspecified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~~~~~~~~~~

p1632.cpp:20:314: error: 'syntax_option_type' does not name a type
   20 | ified; inline constexpr syntax_option_type ECMAScript = unspecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~~~~~~~~~~

p1632.cpp:20:374: error: 'syntax_option_type' does not name a type
   20 | ecified; inline constexpr syntax_option_type basic = unspecified; inline constexpr syntax_option_type extended = unspecified; inline constexpr syntax_option_type awk = unspecified;
      |                                                                                                                                                ^~~~~~~~~~~~~~~~~~

p1632.cpp:21:18: error: 'syntax_option_type' does not name a type
   21 | inline constexpr syntax_option_type grep = unspecified;
      |                  ^~~~~~~~~~~~~~~~~~
p1632.cpp:22:18: error: 'syntax_option_type' does not name a type
   22 | inline constexpr syntax_option_type egrep = unspecified;
      |                  ^~~~~~~~~~~~~~~~~~
p1632.cpp:23:18: error: 'syntax_option_type' does not name a type
   23 | inline constexpr syntax_option_type multiline = unspecified;
      |                  ^~~~~~~~~~~~~~~~~~
p1632.cpp:28:25: error: 'T2' does not name a type
   28 | using match_flag_type = T2;
      |                         ^~
p1632.cpp:29:18: error: 'match_flag_type' does not name a type
   29 | inline constexpr match_flag_type match_default = {};
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:30:18: error: 'match_flag_type' does not name a type
   30 | inline constexpr match_flag_type match_not_bol = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:31:18: error: 'match_flag_type' does not name a type
   31 | inline constexpr match_flag_type match_not_eol = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:32:18: error: 'match_flag_type' does not name a type
   32 | inline constexpr match_flag_type match_not_bow = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:33:18: error: 'match_flag_type' does not name a type
   33 | inline constexpr match_flag_type match_not_eow = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:34:18: error: 'match_flag_type' does not name a type
   34 | inline constexpr match_flag_type match_any = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:35:18: error: 'match_flag_type' does not name a type
   35 | inline constexpr match_flag_type match_not_null = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:36:18: error: 'match_flag_type' does not name a type
   36 | inline constexpr match_flag_type match_continuous = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:37:18: error: 'match_flag_type' does not name a type
   37 | inline constexpr match_flag_type match_prev_avail = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:38:18: error: 'match_flag_type' does not name a type
   38 | inline constexpr match_flag_type format_default = {};
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:39:18: error: 'match_flag_type' does not name a type
   39 | inline constexpr match_flag_type format_sed = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:40:18: error: 'match_flag_type' does not name a type
   40 | inline constexpr match_flag_type format_no_copy = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:41:18: error: 'match_flag_type' does not name a type
   41 | inline constexpr match_flag_type format_first_only = unspecified;
      |                  ^~~~~~~~~~~~~~~
p1632.cpp:76:20: error: 'T3' does not name a type
   76 | using error_type = T3;
      |                    ^~
p1632.cpp:77:18: error: 'error_type' does not name a type; did you mean 'error_code'?
   77 | inline constexpr error_type error_collate = unspecified;
      |                  ^~~~~~~~~~
      |                  error_code
p1632.cpp:78:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   78 |  inline constexpr error_type error_ctype = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:79:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   79 |  inline constexpr error_type error_escape = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:80:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   80 |  inline constexpr error_type error_backref = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:81:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   81 |  inline constexpr error_type error_brack = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:82:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   82 |  inline constexpr error_type error_paren = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:83:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   83 |  inline constexpr error_type error_brace = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:84:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   84 |  inline constexpr error_type error_badbrace = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:85:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   85 |  inline constexpr error_type error_range = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:86:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   86 |  inline constexpr error_type error_space = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:87:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   87 |  inline constexpr error_type error_badrepeat = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:88:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   88 |  inline constexpr error_type error_complexity = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code
p1632.cpp:89:19: error: 'error_type' does not name a type; did you mean 'error_code'?
   89 |  inline constexpr error_type error_stack = unspecified;
      |                   ^~~~~~~~~~
      |                   error_code

検討事項(agenda)

コンパイルエラーを取るか、コンパイルエラーの理由を解説する。

応用例1 AUTOSAR C++

AUTOSARでC++のコーディング標準を作っている。 
MISRA-C++コーディング標準の改訂をまたずに、C++14に対応したかったためかもしれない。 

Autosar Guidelines C++14 example code compile list

MISRA C++, AUTOSAR C++について

応用例2 MISRA C/C++

MISRA C まとめ #include

MISRA C++ 5-0-16

応用例3 CERT C/C++

SEI CERT C++ Coding Standard AA. Bibliography 確認中。

MISRA C/C++, AUTOSAR C++, CERT C/C++とC/C++工業標準をコンパイルする

応用例4 箱庭 

箱庭もくもく会

第11回 未定

箱庭ではUnityをはじめC++を使っているらしい。 

ここでコンパイルしたコードと同じようなコードを使っているか、
ここで出たコンパイルエラーと同じようなエラーがでたかを
いろいろな版のコンパイラでコンパイルして確認していく。

この項目は、箱庭プロジェクトを市場分析の対象として、原則的には、箱庭プロジェクトの外部から分析し、外部から箱庭の広告宣伝のための戦略会議を仮想した結果、仮想「箱庭もくもく会」を開催してみることを企画するものである。 
一切の内容は、箱庭プロジェクト、Athrill, TOPPERSとは無関係である。 
一(いち)参加データアナリストの、個人的なつぶやきです。

仮想戦略会議「箱庭」

お盆には「箱庭」記事を書きましょう「もくもく会」の題材になる(1)

お盆には「箱庭」記事を書きましょう「もくもく会」の題材になる(2)

自己参考資料(self reference)

関連する自己参照以外は、こちらの先頭に移転。

C言語(C++)に対する誤解、曲解、無理解、爽快。

#include "N4910.h"

C++N4910資料の改善点

dockerにclang

docker gnu(gcc/g++) and llvm(clang/clang++)

コンパイル用shell script C版(clangとgcc)とC++版(clang++とg++)

C++N4910:2022 tag follower 300人超えました。ありがとうございます。

astyle 使ってみた

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文書履歴(document history)

ver. 0.01 初稿  20220919

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0