32.3 Header <regex> synopsis [re.syn] C++N4910:2022 (698) p1628.cpp

# はじめに(Introduction)

N4910  Working Draft, Standard for Programming Language C++

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf

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

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

https://stackoverflow.com

http://ja.cppreference.com/

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

https://cpprefjp.github.io/

コンパイラの実装状況

https://cpprefjp.github.io/implementation-status.html

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

## 作業方針(sequence)
Clang++では-std=c++03, C++2bの2種類
g++では-std=c++03, c++2bの２種類
でコンパイルし、

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

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

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

https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

```macOS: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
https://qiita.com/kaizen_nagoya/items/3294c014044550896010

### 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++
https://qiita.com/kaizen_nagoya/items/685b5c1a2c17c1bf1318

## 読書感想文

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

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

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

https://qiita.com/tags/読書感想文

## 個人開発

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

https://qiita.com/tags/個人開発

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

## 編纂器(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.3 Header <regex> synopsis [re.syn] C++N4910:2022 (698) p1628.cpp

## 算譜(source code)

```c++:p1628.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.3 Header <regex> synopsis [re.syn] C++N4910:2022 (698) p1628.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.3 Header <regex> synopsis [re.syn]
#include <compare> // see 17.11.1 
#include <initializer_list> // see 17.10.2
namespace std {
// 32.4, regex constants
namespace regex_constants {
using syntax_option_type = T1;
using match_flag_type = T2;
using error_type = T3;
}
// 32.5, class regex_error
class regex_error;
// 32.6, class template regex_traits
template<class charT> struct regex_traits;
// 32.7, class template basic_regex
template<class charT, class traits = regex_traits<charT>> class basic_regex;
using regex  = basic_regex<char>;
using wregex = basic_regex<wchar_t>;
// 32.7.6, basic_regex swap
template<class charT, class traits>
void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2);
// 32.8, class template sub_match
template<class BidirectionalIterator>
class sub_match;
using csub_match  = sub_match<const char*>;
using wcsub_match = sub_match<const wchar_t*>;
using ssub_match  = sub_match<string::const_iterator>;
using wssub_match = sub_match<wstring::const_iterator>;
// 32.8.3, sub_match non-member operators
template<class BiIter>
bool operator==(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
template<class BiIter>
auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
template<class BiIter, class ST, class SA>
bool operator==(
    const sub_match<BiIter>& lhs,
    const basic_string<typename iterator_traits<BiIter>::value_type, ST, SA>& rhs);
template<class BiIter, class ST, class SA>
auto operator<=>(
    const sub_match<BiIter>& lhs,
    const basic_string<typename iterator_traits<BiIter>::value_type, ST, SA>& rhs);
template<class BiIter>
bool operator==(const sub_match<BiIter>& lhs,
                const typename iterator_traits<BiIter>::value_type* rhs);
template<class BiIter>
auto operator<=>(const sub_match<BiIter>& lhs,
                 const typename iterator_traits<BiIter>::value_type* rhs);
template<class BiIter>
bool operator==(const sub_match<BiIter>& lhs,
                const typename iterator_traits<BiIter>::value_type& rhs);
template<class BiIter>
auto operator<=>(const sub_match<BiIter>& lhs,
                 const typename iterator_traits<BiIter>::value_type& rhs);
template<class charT, class ST, class BiIter>
basic_ostream<charT, ST>&
operator<<(basic_ostream<charT, ST>& os, const sub_match<BiIter>& m);
// 32.9, class template match_results
template<class BidirectionalIterator,
         class Allocator = allocator<sub_match<BidirectionalIterator>>>
                                     class match_results;
         using cmatch  = match_results<const char*>;
         using wcmatch = match_results<const wchar_t*>;
         using smatch  = match_results<string::const_iterator>;
         using wsmatch = match_results<wstring::const_iterator>;
// match_results comparisons
         template<class BidirectionalIterator, class Allocator>
         bool operator==(const match_results<BidirectionalIterator, Allocator>& m1,
                         const match_results<BidirectionalIterator, Allocator>& m2);
// 32.9.8, match_results swap
         template<class BidirectionalIterator, class Allocator>
         void swap(match_results<BidirectionalIterator, Allocator>& m1,
                   match_results<BidirectionalIterator, Allocator>& m2);
// 32.10.2, function template regex_match
         template<class BidirectionalIterator, class Allocator, class charT, class traits>
         bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
                          match_results<BidirectionalIterator, Allocator>& m,
                          const basic_regex<charT, traits>& e,
                          regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class BidirectionalIterator, class charT, class traits>
         bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
                          const basic_regex<charT, traits>& e,
                          regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class charT, class Allocator, class traits>
         bool regex_match(const charT* str, match_results<const charT*, Allocator>& m,
                          const basic_regex<charT, traits>& e,
                          regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class ST, class SA, class Allocator, class charT, class traits>
         bool regex_match(const basic_string<charT, ST, SA>& s,
                          match_results<typename basic_string<charT, ST, SA>::const_iterator,
                                        Allocator>& m,
                          const basic_regex<charT, traits>& e,
                          regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class ST, class SA, class Allocator, class charT, class traits>
         bool regex_match(const basic_string<charT, ST, SA>&&,
                          match_results<typename basic_string<charT, ST, SA>::const_iterator,
                                        Allocator>&,
                          const basic_regex<charT, traits>&,
                          regex_constants::match_flag_type = regex_constants::match_default) = delete;
         template<class charT, class traits>
         bool regex_match(const charT* str,
                          const basic_regex<charT, traits>& e,
                          regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class ST, class SA, class charT, class traits>
         bool regex_match(const basic_string<charT, ST, SA>& s,
                          const basic_regex<charT, traits>& e,
                          regex_constants::match_flag_type flags = regex_constants::match_default);
// 32.10.3, function template regex_search
         template<class BidirectionalIterator, class Allocator, class charT, class traits>
         bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
                           match_results<BidirectionalIterator, Allocator>& m,
                           const basic_regex<charT, traits>& e,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class BidirectionalIterator, class charT, class traits>
         bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
                           const basic_regex<charT, traits>& e,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class charT, class Allocator, class traits>
         bool regex_search(const charT* str,
                           match_results<const charT*, Allocator>& m,
                           const basic_regex<charT, traits>& e,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class charT, class traits>
         bool regex_search(const charT* str,
                           const basic_regex<charT, traits>& e,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class ST, class SA, class charT, class traits>
         bool regex_search(const basic_string<charT, ST, SA>& s,
                           const basic_regex<charT, traits>& e,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class ST, class SA, class Allocator, class charT, class traits>
         bool regex_search(const basic_string<charT, ST, SA>& s,
                           match_results<typename basic_string<charT, ST, SA>::const_iterator,
                                   Allocator>& m,
                           const basic_regex<charT, traits>& e,
                           regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class ST, class SA, class Allocator, class charT, class traits>
         bool regex_search(const basic_string<charT, ST, SA>&&,
                           match_results<typename basic_string<charT, ST, SA>::const_iterator,
                                   Allocator>&,
                           const basic_regex<charT, traits>&,
                           regex_constants::match_flag_type
                           = regex_constants::match_default) = delete;
// 32.10.4, function template regex_replace
         template<class OutputIterator, class BidirectionalIterator,
                  class traits, class charT, class ST, class SA>
         OutputIterator
         regex_replace(OutputIterator out,
                       BidirectionalIterator first, BidirectionalIterator last,
                       const basic_regex<charT, traits>& e,
                       const basic_string<charT, ST, SA>& fmt,
                       regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class OutputIterator, class BidirectionalIterator, class traits, class charT>
         OutputIterator
         regex_replace(OutputIterator out,
                       BidirectionalIterator first, BidirectionalIterator last,
                       const basic_regex<charT, traits>& e,
                       const charT* fmt,
                       regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class traits, class charT, class ST, class SA, class FST, class FSA>
         basic_string<charT, ST, SA>
         regex_replace(const basic_string<charT, ST, SA>& s,
                       const basic_regex<charT, traits>& e,
                       const basic_string<charT, FST, FSA>& fmt,
                       regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class traits, class charT, class ST, class SA>
         basic_string<charT, ST, SA>
         regex_replace(const basic_string<charT, ST, SA>& s,
                       const basic_regex<charT, traits>& e,
                       const charT* fmt,
                       regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class traits, class charT, class ST, class SA>
         basic_string<charT>
         regex_replace(const charT* s,
                       const basic_regex<charT, traits>& e,
                       const basic_string<charT, ST, SA>& fmt,
                       regex_constants::match_flag_type flags = regex_constants::match_default);
         template<class traits, class charT>
         basic_string<charT>
         regex_replace(const charT* s,
                       const basic_regex<charT, traits>& e,
                       const charT* fmt,
                       regex_constants::match_flag_type flags = regex_constants::match_default);
// 32.11.1, class template regex_iterator
         template<class BidirectionalIterator,
                  class charT = typename iterator_traits<BidirectionalIterator>::value_type,
                  class traits = regex_traits<charT>>
         class regex_iterator;
         using cregex_iterator  = regex_iterator<const char*>;
         using wcregex_iterator = regex_iterator<const wchar_t*>;
         using sregex_iterator  = regex_iterator<string::const_iterator>;
         using wsregex_iterator = regex_iterator<wstring::const_iterator>;
// 32.11.2, class template regex_token_iterator
         template<class BidirectionalIterator,
                  class charT = typename iterator_traits<BidirectionalIterator>::value_type,
                  class traits = regex_traits<charT>>
         class regex_token_iterator;
         using cregex_token_iterator  = regex_token_iterator<const char*>;
         using wcregex_token_iterator = regex_token_iterator<const wchar_t*>;
         using sregex_token_iterator  = regex_token_iterator<string::const_iterator>;
         using wsregex_token_iterator = regex_token_iterator<wstring::const_iterator>;
         namespace pmr {
template<class BidirectionalIterator>
using match_results =
std::match_results<BidirectionalIterator,
                   polymorphic_allocator<sub_match<BidirectionalIterator>>>;
                   using cmatch  = match_results<const char*>;
                   using wcmatch = match_results<const wchar_t*>;
                   using smatch  = match_results<string::const_iterator>;
                   using wsmatch = match_results<wstring::const_iterator>;
}
}
int main() {
    cout  <<  n4910 << endl;
          return EXIT_SUCCESS;
}
```

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

```ubuntu:bash
$ clang++ p1628.cpp -std=03 -o p1628l -I. -Wall
In file included from p1628.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 \
 ^
p1628.cpp:20:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using syntax_option_type = T1; 
                           ^
p1628.cpp:20:28: error: unknown type name 'T1'
p1628.cpp:21:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using match_flag_type = T2; 
                        ^
p1628.cpp:21:25: error: unknown type name 'T2'
p1628.cpp:22:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using error_type = T3;
                   ^
p1628.cpp:22:20: error: unknown type name 'T3'
p1628.cpp:29:56: error: a space is required between consecutive right angle brackets (use '> >')
template<class charT, class traits = regex_traits<charT>> class basic_regex;
                                                       ^~
                                                       > >
p1628.cpp:30:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
       using regex  = basic_regex<char>;
                      ^
p1628.cpp:31:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
       using wregex = basic_regex<wchar_t>;
                      ^
p1628.cpp:38:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
       using csub_match  = sub_match<const char*>;
                           ^
p1628.cpp:39:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
       using wcsub_match = sub_match<const wchar_t*>;
                           ^
p1628.cpp:40:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
       using ssub_match  = sub_match<string::const_iterator>;
                           ^
p1628.cpp:41:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using wssub_match = sub_match<wstring::const_iterator>;
                    ^
p1628.cpp:46:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
  ^
p1628.cpp:46:16: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
  auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
               ^
                  
p1628.cpp:46:8: error: 'operator<=' cannot be the name of a variable or data member
  auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
       ^
p1628.cpp:46:18: error: expected ';' at end of declaration
  auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
                 ^
                 ;
p1628.cpp:46:18: error: expected unqualified-id
p1628.cpp:52:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  auto operator<=>(
  ^
p1628.cpp:52:16: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
  auto operator<=>(
               ^
                  
p1628.cpp:52:8: error: 'operator<=' cannot be the name of a variable or data member
  auto operator<=>(
       ^
p1628.cpp:52:18: error: expected ';' at end of declaration
  auto operator<=>(
                 ^
                 ;
p1628.cpp:52:18: error: expected unqualified-id
p1628.cpp:59:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  auto operator<=>(const sub_match<BiIter>& lhs,
  ^
p1628.cpp:59:16: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
  auto operator<=>(const sub_match<BiIter>& lhs,
               ^
                  
p1628.cpp:59:8: error: 'operator<=' cannot be the name of a variable or data member
  auto operator<=>(const sub_match<BiIter>& lhs,
       ^
p1628.cpp:59:18: error: expected ';' at end of declaration
  auto operator<=>(const sub_match<BiIter>& lhs,
                 ^
                 ;
p1628.cpp:59:18: error: expected unqualified-id
p1628.cpp:65:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
  auto operator<=>(const sub_match<BiIter>& lhs,
  ^
p1628.cpp:65:16: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
  auto operator<=>(const sub_match<BiIter>& lhs,
               ^
                  
p1628.cpp:65:8: error: 'operator<=' cannot be the name of a variable or data member
  auto operator<=>(const sub_match<BiIter>& lhs,
       ^
p1628.cpp:65:18: error: expected ';' at end of declaration
  auto operator<=>(const sub_match<BiIter>& lhs,
                 ^
                 ;
p1628.cpp:65:18: error: expected unqualified-id
p1628.cpp:72:69: error: a space is required between consecutive right angle brackets (use '> >')
         class Allocator = allocator<sub_match<BidirectionalIterator>>>
                                                                    ^~
                                                                    > > 
p1628.cpp:74:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using cmatch  = match_results<const char*>;
                ^
p1628.cpp:75:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using wcmatch = match_results<const wchar_t*>;
                ^
p1628.cpp:76:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using smatch  = match_results<string::const_iterator>;
                ^
p1628.cpp:77:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using wsmatch = match_results<wstring::const_iterator>;
                ^
p1628.cpp:91:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
21 warnings and 20 errors generated.
$ clang++ p1628.cpp -std=2b -o p1628l -I. -Wall
p1628.cpp:20:28: error: unknown type name 'T1'
using syntax_option_type = T1; 
                           ^
p1628.cpp:21:25: error: unknown type name 'T2'
using match_flag_type = T2; 
                        ^
p1628.cpp:22:20: error: unknown type name 'T3'
using error_type = T3;
                   ^
p1628.cpp:91:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:91:78: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                                                            ~~~~~~~~~~~~~~~~~^
p1628.cpp:95:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:95:78: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                                                            ~~~~~~~~~~~~~~~~~^
p1628.cpp:99:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:99:78: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                                                            ~~~~~~~~~~~~~~~~~^
p1628.cpp:105:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:105:78: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                                                            ~~~~~~~~~~~~~~~~~^
p1628.cpp:111:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type = regex_constants::match_default) = delete;
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:111:72: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type = regex_constants::match_default) = delete;
                                                      ~~~~~~~~~~~~~~~~~^
p1628.cpp:115:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:115:78: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                                                            ~~~~~~~~~~~~~~~~~^
p1628.cpp:119:37: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                   ~~~~~~~~~~~~~~~~~^
p1628.cpp:119:78: error: no member named 'match_default' in namespace 'std::regex_constants'
                   regex_constants::match_flag_type flags = regex_constants::match_default);
                                                            ~~~~~~~~~~~~~~~~~^
p1628.cpp:125:38: error: no type named 'match_flag_type' in namespace 'std::regex_constants'
                    regex_constants::match_flag_type flags = regex_constants::match_default);
                    ~~~~~~~~~~~~~~~~~^
p1628.cpp:125:79: error: no member named 'match_default' in namespace 'std::regex_constants'
                    regex_constants::match_flag_type flags = regex_constants::match_default);
                                                             ~~~~~~~~~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p1628.cpp -std=03 -o p1628g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1628.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 \
      |  ^~~~~
p1628.cpp:20:7: error: expected nested-name-specifier before 'syntax_option_type'
   20 | using syntax_option_type = T1;
      |       ^~~~~~~~~~~~~~~~~~
p1628.cpp:21:7: error: expected nested-name-specifier before 'match_flag_type'
   21 | using match_flag_type = T2;
      |       ^~~~~~~~~~~~~~~
p1628.cpp:22:7: error: expected nested-name-specifier before 'error_type'
   22 | using error_type = T3;
      |       ^~~~~~~~~~
p1628.cpp:29:56: error: spurious '>>', use '>' to terminate a template argument list
   29 | template<class charT, class traits = regex_traits<charT>> class basic_regex;
      |                                                        ^~
p1628.cpp:29:38: error: two or more data types in declaration of 'type name'
   29 | template<class charT, class traits = regex_traits<charT>> class basic_regex;
      |                                      ^~~~~~~~~~~~~~~~~~~~
p1628.cpp:29:76: error: expected '>' before ';' token
   29 | template<class charT, class traits = regex_traits<charT>> class basic_regex;
      |                                                                            ^
p1628.cpp:29:76: error: expected unqualified-id before ';' token
p1628.cpp:30:14: error: expected nested-name-specifier before 'regex'
   30 |        using regex  = basic_regex<char>;
      |              ^~~~~
p1628.cpp:31:14: error: expected nested-name-specifier before 'wregex'
   31 |        using wregex = basic_regex<wchar_t>;
      |              ^~~~~~
p1628.cpp:34:20: error: 'std::basic_regex' is not a template
   34 |          void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2);
      |                    ^~~~~~~~~~~
p1628.cpp:34:52: error: 'std::basic_regex' is not a template
   34 |          void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2);
      |                                                    ^~~~~~~~~~~
p1628.cpp:38:14: error: expected nested-name-specifier before 'csub_match'
   38 |        using csub_match  = sub_match<const char*>;
      |              ^~~~~~~~~~
p1628.cpp:39:14: error: expected nested-name-specifier before 'wcsub_match'
   39 |        using wcsub_match = sub_match<const wchar_t*>;
      |              ^~~~~~~~~~~
p1628.cpp:40:14: error: expected nested-name-specifier before 'ssub_match'
   40 |        using ssub_match  = sub_match<string::const_iterator>;
      |              ^~~~~~~~~~
p1628.cpp:41:7: error: expected nested-name-specifier before 'wssub_match'
   41 | using wssub_match = sub_match<wstring::const_iterator>;
      |       ^~~~~~~~~~~
p1628.cpp:46:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   46 |   auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
      |   ^~~~
      |   ----
p1628.cpp:46:8: error: 'operator<=' does not name a type; did you mean 'iterator'?
   46 |   auto operator<=>(const sub_match<BiIter>& lhs, const sub_match<BiIter>& rhs);
      |        ^~~~~~~~
      |        iterator
p1628.cpp:52:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   52 |   auto operator<=>(
      |   ^~~~
      |   ----
p1628.cpp:52:8: error: 'operator<=' does not name a type; did you mean 'iterator'?
   52 |   auto operator<=>(
      |        ^~~~~~~~
      |        iterator
p1628.cpp:59:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   59 |   auto operator<=>(const sub_match<BiIter>& lhs,
      |   ^~~~
      |   ----
p1628.cpp:59:8: error: 'operator<=' does not name a type; did you mean 'iterator'?
   59 |   auto operator<=>(const sub_match<BiIter>& lhs,
      |        ^~~~~~~~
      |        iterator
p1628.cpp:65:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   65 |   auto operator<=>(const sub_match<BiIter>& lhs,
      |   ^~~~
      |   ----
p1628.cpp:65:8: error: 'operator<=' does not name a type; did you mean 'iterator'?
   65 |   auto operator<=>(const sub_match<BiIter>& lhs,
      |        ^~~~~~~~
      |        iterator
p1628.cpp:72:69: error: '>>' should be '> >' within a nested template argument list
   72 |          class Allocator = allocator<sub_match<BidirectionalIterator>>>
      |                                                                     ^~
      |                                                                     > >
p1628.cpp:74:7: error: expected nested-name-specifier before 'cmatch'
   74 | using cmatch  = match_results<const char*>;
      |       ^~~~~~
p1628.cpp:75:7: error: expected nested-name-specifier before 'wcmatch'
   75 | using wcmatch = match_results<const wchar_t*>;
      |       ^~~~~~~
p1628.cpp:76:7: error: expected nested-name-specifier before 'smatch'
   76 | using smatch  = match_results<string::const_iterator>;
      |       ^~~~~~
p1628.cpp:77:7: error: expected nested-name-specifier before 'wsmatch'
   77 | using wsmatch = match_results<wstring::const_iterator>;
      |       ^~~~~~~
p1628.cpp:90:26: error: 'std::basic_regex' is not a template
   90 |                    const basic_regex<charT, traits>& e,
      |                          ^~~~~~~~~~~
p1628.cpp:91:37: error: 'std::regex_constants::match_flag_type' has not been declared
   91 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                     ^~~~~~~~~~~~~~~
p1628.cpp:91:78: error: 'match_default' is not a member of 'std::regex_constants'
   91 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:94:26: error: 'std::basic_regex' is not a template
   94 |                    const basic_regex<charT, traits>& e,
      |                          ^~~~~~~~~~~
p1628.cpp:95:37: error: 'std::regex_constants::match_flag_type' has not been declared
   95 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                     ^~~~~~~~~~~~~~~
p1628.cpp:95:78: error: 'match_default' is not a member of 'std::regex_constants'
   95 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:98:26: error: 'std::basic_regex' is not a template
   98 |                    const basic_regex<charT, traits>& e,
      |                          ^~~~~~~~~~~
p1628.cpp:99:37: error: 'std::regex_constants::match_flag_type' has not been declared
   99 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                     ^~~~~~~~~~~~~~~
p1628.cpp:99:78: error: 'match_default' is not a member of 'std::regex_constants'
   99 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:104:26: error: 'std::basic_regex' is not a template
  104 |                    const basic_regex<charT, traits>& e,
      |                          ^~~~~~~~~~~
p1628.cpp:105:37: error: 'std::regex_constants::match_flag_type' has not been declared
  105 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                     ^~~~~~~~~~~~~~~
p1628.cpp:105:78: error: 'match_default' is not a member of 'std::regex_constants'
  105 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:107:53: error: expected ',' or '...' before '&&' token
  107 |   bool regex_match(const basic_string<charT, ST, SA>&&,
      |                                                     ^~
p1628.cpp:111:89: warning: defaulted and deleted functions only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  111 |                    regex_constants::match_flag_type = regex_constants::match_default) = delete;
      |                                                                                         ^~~~~~
p1628.cpp:114:26: error: 'std::basic_regex' is not a template
  114 |                    const basic_regex<charT, traits>& e,
      |                          ^~~~~~~~~~~
p1628.cpp:115:37: error: 'std::regex_constants::match_flag_type' has not been declared
  115 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                     ^~~~~~~~~~~~~~~
p1628.cpp:115:78: error: 'match_default' is not a member of 'std::regex_constants'
  115 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:118:26: error: 'std::basic_regex' is not a template
  118 |                    const basic_regex<charT, traits>& e,
      |                          ^~~~~~~~~~~
p1628.cpp:119:37: error: 'std::regex_constants::match_flag_type' has not been declared
  119 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                     ^~~~~~~~~~~~~~~
p1628.cpp:119:78: error: 'match_default' is not a member of 'std::regex_constants'
  119 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:124:27: error: 'std::basic_regex' is not a template
  124 |                     const basic_regex<charT, traits>& e,
      |                           ^~~~~~~~~~~
p1628.cpp:125:38: error: 'std::regex_constants::match_flag_type' has not been declared
  125 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                      ^~~~~~~~~~~~~~~
p1628.cpp:125:79: error: 'match_default' is not a member of 'std::regex_constants'
  125 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:128:27: error: 'std::basic_regex' is not a template
  128 |                     const basic_regex<charT, traits>& e,
      |                           ^~~~~~~~~~~
p1628.cpp:129:38: error: 'std::regex_constants::match_flag_type' has not been declared
  129 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                      ^~~~~~~~~~~~~~~
p1628.cpp:129:79: error: 'match_default' is not a member of 'std::regex_constants'
  129 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:133:27: error: 'std::basic_regex' is not a template
  133 |                     const basic_regex<charT, traits>& e,
      |                           ^~~~~~~~~~~
p1628.cpp:134:38: error: 'std::regex_constants::match_flag_type' has not been declared
  134 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                      ^~~~~~~~~~~~~~~
p1628.cpp:134:79: error: 'match_default' is not a member of 'std::regex_constants'
  134 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:137:27: error: 'std::basic_regex' is not a template
  137 |                     const basic_regex<charT, traits>& e,
      |                           ^~~~~~~~~~~
p1628.cpp:138:38: error: 'std::regex_constants::match_flag_type' has not been declared
  138 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                      ^~~~~~~~~~~~~~~
p1628.cpp:138:79: error: 'match_default' is not a member of 'std::regex_constants'
  138 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:141:27: error: 'std::basic_regex' is not a template
  141 |                     const basic_regex<charT, traits>& e,
      |                           ^~~~~~~~~~~
p1628.cpp:142:38: error: 'std::regex_constants::match_flag_type' has not been declared
  142 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                      ^~~~~~~~~~~~~~~
p1628.cpp:142:79: error: 'match_default' is not a member of 'std::regex_constants'
  142 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:147:27: error: 'std::basic_regex' is not a template
  147 |                     const basic_regex<charT, traits>& e,
      |                           ^~~~~~~~~~~
p1628.cpp:148:38: error: 'std::regex_constants::match_flag_type' has not been declared
  148 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                      ^~~~~~~~~~~~~~~
p1628.cpp:148:79: error: 'match_default' is not a member of 'std::regex_constants'
  148 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:150:54: error: expected ',' or '...' before '&&' token
  150 |   bool regex_search(const basic_string<charT, ST, SA>&&,
      |                                                      ^~
p1628.cpp:155:59: warning: defaulted and deleted functions only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  155 |                       = regex_constants::match_default) = delete;
      |                                                           ^~~~~~
p1628.cpp:162:25: error: 'std::basic_regex' is not a template
  162 |                   const basic_regex<charT, traits>& e,
      |                         ^~~~~~~~~~~
p1628.cpp:164:36: error: 'std::regex_constants::match_flag_type' has not been declared
  164 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                    ^~~~~~~~~~~~~~~
p1628.cpp:164:77: error: 'match_default' is not a member of 'std::regex_constants'
  164 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:169:25: error: 'std::basic_regex' is not a template
  169 |                   const basic_regex<charT, traits>& e,
      |                         ^~~~~~~~~~~
p1628.cpp:171:36: error: 'std::regex_constants::match_flag_type' has not been declared
  171 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                    ^~~~~~~~~~~~~~~
p1628.cpp:171:77: error: 'match_default' is not a member of 'std::regex_constants'
  171 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:175:25: error: 'std::basic_regex' is not a template
  175 |                   const basic_regex<charT, traits>& e,
      |                         ^~~~~~~~~~~
p1628.cpp:177:36: error: 'std::regex_constants::match_flag_type' has not been declared
  177 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                    ^~~~~~~~~~~~~~~
p1628.cpp:177:77: error: 'match_default' is not a member of 'std::regex_constants'
  177 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:181:25: error: 'std::basic_regex' is not a template
  181 |                   const basic_regex<charT, traits>& e,
      |                         ^~~~~~~~~~~
p1628.cpp:183:36: error: 'std::regex_constants::match_flag_type' has not been declared
  183 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                    ^~~~~~~~~~~~~~~
p1628.cpp:183:77: error: 'match_default' is not a member of 'std::regex_constants'
  183 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:187:25: error: 'std::basic_regex' is not a template
  187 |                   const basic_regex<charT, traits>& e,
      |                         ^~~~~~~~~~~
p1628.cpp:189:36: error: 'std::regex_constants::match_flag_type' has not been declared
  189 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                    ^~~~~~~~~~~~~~~
p1628.cpp:189:77: error: 'match_default' is not a member of 'std::regex_constants'
  189 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:193:25: error: 'std::basic_regex' is not a template
  193 |                   const basic_regex<charT, traits>& e,
      |                         ^~~~~~~~~~~
p1628.cpp:195:36: error: 'std::regex_constants::match_flag_type' has not been declared
  195 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                    ^~~~~~~~~~~~~~~
p1628.cpp:195:77: error: 'match_default' is not a member of 'std::regex_constants'
  195 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:199:44: error: spurious '>>', use '>' to terminate a template argument list
  199 |           class traits = regex_traits<charT>>
      |                                            ^~
p1628.cpp:199:26: error: two or more data types in declaration of 'type name'
  199 |           class traits = regex_traits<charT>>
      |                          ^~~~~~~~~~~~~~~~~~~~
p1628.cpp:200:23: error: expected '>' before ';' token
  200 |   class regex_iterator;
      |                       ^
p1628.cpp:200:23: error: expected unqualified-id before ';' token
p1628.cpp:201:7: error: expected nested-name-specifier before 'cregex_iterator'
  201 | using cregex_iterator  = regex_iterator<const char*>;
      |       ^~~~~~~~~~~~~~~
p1628.cpp:202:7: error: expected nested-name-specifier before 'wcregex_iterator'
  202 | using wcregex_iterator = regex_iterator<const wchar_t*>;
      |       ^~~~~~~~~~~~~~~~
p1628.cpp:203:7: error: expected nested-name-specifier before 'sregex_iterator'
  203 | using sregex_iterator  = regex_iterator<string::const_iterator>;
      |       ^~~~~~~~~~~~~~~
p1628.cpp:204:7: error: expected nested-name-specifier before 'wsregex_iterator'
  204 | using wsregex_iterator = regex_iterator<wstring::const_iterator>;
      |       ^~~~~~~~~~~~~~~~
p1628.cpp:208:44: error: spurious '>>', use '>' to terminate a template argument list
  208 |           class traits = regex_traits<charT>>
      |                                            ^~
p1628.cpp:208:26: error: two or more data types in declaration of 'type name'
  208 |           class traits = regex_traits<charT>>
      |                          ^~~~~~~~~~~~~~~~~~~~
p1628.cpp:209:29: error: expected '>' before ';' token
  209 |   class regex_token_iterator;
      |                             ^
p1628.cpp:209:29: error: expected unqualified-id before ';' token
p1628.cpp:210:7: error: expected nested-name-specifier before 'cregex_token_iterator'
  210 | using cregex_token_iterator  = regex_token_iterator<const char*>;
      |       ^~~~~~~~~~~~~~~~~~~~~
p1628.cpp:211:7: error: expected nested-name-specifier before 'wcregex_token_iterator'
  211 | using wcregex_token_iterator = regex_token_iterator<const wchar_t*>;
      |       ^~~~~~~~~~~~~~~~~~~~~~
p1628.cpp:212:7: error: expected nested-name-specifier before 'sregex_token_iterator'
  212 | using sregex_token_iterator  = regex_token_iterator<string::const_iterator>;
      |       ^~~~~~~~~~~~~~~~~~~~~
p1628.cpp:213:7: error: expected nested-name-specifier before 'wsregex_token_iterator'
  213 | using wsregex_token_iterator = regex_token_iterator<wstring::const_iterator>;
      |       ^~~~~~~~~~~~~~~~~~~~~~
p1628.cpp:216:7: error: expected unqualified-id before 'using'
  216 |       using match_results =
      |       ^~~~~
p1628.cpp:219:11: error: expected nested-name-specifier before 'cmatch'
  219 |     using cmatch  = match_results<const char*>;
      |           ^~~~~~
p1628.cpp:220:11: error: expected nested-name-specifier before 'wcmatch'
  220 |     using wcmatch = match_results<const wchar_t*>;
      |           ^~~~~~~
p1628.cpp:221:11: error: expected nested-name-specifier before 'smatch'
  221 |     using smatch  = match_results<string::const_iterator>;
      |           ^~~~~~
p1628.cpp:222:11: error: expected nested-name-specifier before 'wsmatch'
  222 |     using wsmatch = match_results<wstring::const_iterator>;
      |           ^~~~~~~

$ g++ p1628.cpp -std=2b -o p1628g -I. -Wall
p1628.cpp:20:28: error: 'T1' does not name a type
   20 | using syntax_option_type = T1;
      |                            ^~
p1628.cpp:21:25: error: 'T2' does not name a type
   21 | using match_flag_type = T2;
      |                         ^~
p1628.cpp:22:20: error: 'T3' does not name a type
   22 | using error_type = T3;
      |                    ^~
p1628.cpp:91:20: error: 'std::regex_constants::match_flag_type' has not been declared
   91 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:91:78: error: 'match_default' is not a member of 'std::regex_constants'
   91 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:95:20: error: 'std::regex_constants::match_flag_type' has not been declared
   95 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:95:78: error: 'match_default' is not a member of 'std::regex_constants'
   95 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:99:20: error: 'std::regex_constants::match_flag_type' has not been declared
   99 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:99:78: error: 'match_default' is not a member of 'std::regex_constants'
   99 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:105:20: error: 'std::regex_constants::match_flag_type' has not been declared
  105 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:105:78: error: 'match_default' is not a member of 'std::regex_constants'
  105 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:111:20: error: 'std::regex_constants::match_flag_type' has not been declared
  111 |                    regex_constants::match_flag_type = regex_constants::match_default) = delete;
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:111:72: error: 'match_default' is not a member of 'std::regex_constants'
  111 |                    regex_constants::match_flag_type = regex_constants::match_default) = delete;
      |                                                                        ^~~~~~~~~~~~~
p1628.cpp:115:20: error: 'std::regex_constants::match_flag_type' has not been declared
  115 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:115:78: error: 'match_default' is not a member of 'std::regex_constants'
  115 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:119:20: error: 'std::regex_constants::match_flag_type' has not been declared
  119 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                    ^~~~~~~~~~~~~~~
p1628.cpp:119:78: error: 'match_default' is not a member of 'std::regex_constants'
  119 |                    regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                              ^~~~~~~~~~~~~
p1628.cpp:125:21: error: 'std::regex_constants::match_flag_type' has not been declared
  125 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:125:79: error: 'match_default' is not a member of 'std::regex_constants'
  125 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:129:21: error: 'std::regex_constants::match_flag_type' has not been declared
  129 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:129:79: error: 'match_default' is not a member of 'std::regex_constants'
  129 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:134:21: error: 'std::regex_constants::match_flag_type' has not been declared
  134 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:134:79: error: 'match_default' is not a member of 'std::regex_constants'
  134 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:138:21: error: 'std::regex_constants::match_flag_type' has not been declared
  138 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:138:79: error: 'match_default' is not a member of 'std::regex_constants'
  138 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:142:21: error: 'std::regex_constants::match_flag_type' has not been declared
  142 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:142:79: error: 'match_default' is not a member of 'std::regex_constants'
  142 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:148:21: error: 'std::regex_constants::match_flag_type' has not been declared
  148 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:148:79: error: 'match_default' is not a member of 'std::regex_constants'
  148 |                     regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                               ^~~~~~~~~~~~~
p1628.cpp:154:21: error: 'std::regex_constants::match_flag_type' has not been declared
  154 |                     regex_constants::match_flag_type
      |                     ^~~~~~~~~~~~~~~
p1628.cpp:155:42: error: 'match_default' is not a member of 'std::regex_constants'
  155 |                       = regex_constants::match_default) = delete;
      |                                          ^~~~~~~~~~~~~
p1628.cpp:164:19: error: 'std::regex_constants::match_flag_type' has not been declared
  164 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                   ^~~~~~~~~~~~~~~
p1628.cpp:164:77: error: 'match_default' is not a member of 'std::regex_constants'
  164 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:171:19: error: 'std::regex_constants::match_flag_type' has not been declared
  171 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                   ^~~~~~~~~~~~~~~
p1628.cpp:171:77: error: 'match_default' is not a member of 'std::regex_constants'
  171 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:177:19: error: 'std::regex_constants::match_flag_type' has not been declared
  177 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                   ^~~~~~~~~~~~~~~
p1628.cpp:177:77: error: 'match_default' is not a member of 'std::regex_constants'
  177 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:183:19: error: 'std::regex_constants::match_flag_type' has not been declared
  183 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                   ^~~~~~~~~~~~~~~
p1628.cpp:183:77: error: 'match_default' is not a member of 'std::regex_constants'
  183 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:189:19: error: 'std::regex_constants::match_flag_type' has not been declared
  189 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                   ^~~~~~~~~~~~~~~
p1628.cpp:189:77: error: 'match_default' is not a member of 'std::regex_constants'
  189 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
p1628.cpp:195:19: error: 'std::regex_constants::match_flag_type' has not been declared
  195 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                   ^~~~~~~~~~~~~~~
p1628.cpp:195:77: error: 'match_default' is not a member of 'std::regex_constants'
  195 |                   regex_constants::match_flag_type flags = regex_constants::match_default);
      |                                                                             ^~~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/string:53,
                 from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
                 from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
                 from /usr/local/include/c++/12.1.0/ios:42,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39,
                 from N4910.h:2,
                 from p1628.cpp:10:
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'class std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >':
p1628.cpp:221:41:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:89:31: error: invalid use of incomplete type 'class std::pmr::polymorphic_allocator<char>'
   89 |         rebind<_CharT>::other _Char_alloc_type;
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/string:61:34: note: declaration of 'class std::pmr::polymorphic_allocator<char>'
   61 |     template<typename _Tp> class polymorphic_allocator;
      |                                  ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>':
/usr/local/include/c++/12.1.0/bits/basic_string.h:127:50:   required from 'class std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >'
p1628.cpp:221:41:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:113:16: error: invalid use of incomplete type 'class std::pmr::polymorphic_allocator<char>'
  113 |         struct _Alloc_traits_impl<char_traits<_CharT>, _Dummy_for_PR85282>
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/string:61:34: note: declaration of 'class std::pmr::polymorphic_allocator<char>'
   61 |     template<typename _Tp> class polymorphic_allocator;
      |                                  ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'class std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >':
p1628.cpp:221:41:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:127:57: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  127 |       typedef typename _Alloc_traits::size_type         size_type;
      |                                                         ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:128:57: error: no type named 'difference_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  128 |       typedef typename _Alloc_traits::difference_type   difference_type;
      |                                                         ^~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:129:57: error: no type named 'reference' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  129 |       typedef typename _Alloc_traits::reference         reference;
      |                                                         ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:130:57: error: no type named 'const_reference' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  130 |       typedef typename _Alloc_traits::const_reference   const_reference;
      |                                                         ^~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:131:57: error: no type named 'pointer' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  131 |       typedef typename _Alloc_traits::pointer           pointer;
      |                                                         ^~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:132:57: error: no type named 'const_pointer' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  132 |       typedef typename _Alloc_traits::const_pointer     const_pointer;
      |                                                         ^~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:133:68: error: no type named 'pointer' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  133 |       typedef __gnu_cxx::__normal_iterator<pointer, basic_string>  iterator;
      |                                                                    ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:135:57: error: no type named 'const_pointer' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  135 |                                                         const_iterator;
      |                                                         ^~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:136:57: error: no type named 'const_pointer' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  136 |       typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:137:57: error: no type named 'pointer' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
  137 |       typedef std::reverse_iterator<iterator>           reverse_iterator;
      |                                                         ^~~~~~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/ext/alloc_traits.h:34,
                 from /usr/local/include/c++/12.1.0/bits/basic_string.h:40:
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In substitution of 'template<class _Alloc> using _RequireAllocator = typename std::enable_if<std::__is_allocator<_Alloc>::value, _Alloc>::type [with _Alloc = std::pmr::polymorphic_allocator<char>]':
/usr/local/include/c++/12.1.0/bits/basic_string.h:634:7:   required from 'class std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >'
p1628.cpp:221:41:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:807:11: error: no type named 'type' in 'struct std::enable_if<false, std::pmr::polymorphic_allocator<char> >'
  807 |     using _RequireAllocator
      |           ^~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'class std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >':
p1628.cpp:221:41:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:2634:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
 2634 |         find(const _Tp& __svt, size_type __pos = 0) const
      |         ^~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2700:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
 2700 |         rfind(const _Tp& __svt, size_type __pos = npos) const
      |         ^~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2785:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
 2785 |         find_first_of(const _Tp& __svt, size_type __pos = 0) const
      |         ^~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2874:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
 2874 |         find_last_of(const _Tp& __svt, size_type __pos = npos) const
      |         ^~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2962:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
 2962 |         find_first_not_of(const _Tp& __svt, size_type __pos = 0) const
      |         ^~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:3049:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char> >::_Alloc_traits_impl<std::char_traits<char>, void>'
 3049 |         find_last_not_of(const _Tp& __svt, size_type __pos = npos) const
      |         ^~~~~~~~~~~~~~~~
p1628.cpp:221:57: error: template argument 1 is invalid
  221 |     using smatch  = match_results<string::const_iterator>;
      |                                                         ^
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'class std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >':
p1628.cpp:222:42:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:89:31: error: invalid use of incomplete type 'class std::pmr::polymorphic_allocator<wchar_t>'
   89 |         rebind<_CharT>::other _Char_alloc_type;
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/string:61:34: note: declaration of 'class std::pmr::polymorphic_allocator<wchar_t>'
   61 |     template<typename _Tp> class polymorphic_allocator;
      |                                  ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>':
/usr/local/include/c++/12.1.0/bits/basic_string.h:127:50:   required from 'class std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >'
p1628.cpp:222:42:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:113:16: error: invalid use of incomplete type 'class std::pmr::polymorphic_allocator<wchar_t>'
  113 |         struct _Alloc_traits_impl<char_traits<_CharT>, _Dummy_for_PR85282>
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/string:61:34: note: declaration of 'class std::pmr::polymorphic_allocator<wchar_t>'
   61 |     template<typename _Tp> class polymorphic_allocator;
      |                                  ^~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'class std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >':
p1628.cpp:222:42:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:127:57: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  127 |       typedef typename _Alloc_traits::size_type         size_type;
      |                                                         ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:128:57: error: no type named 'difference_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  128 |       typedef typename _Alloc_traits::difference_type   difference_type;
      |                                                         ^~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:129:57: error: no type named 'reference' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  129 |       typedef typename _Alloc_traits::reference         reference;
      |                                                         ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:130:57: error: no type named 'const_reference' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  130 |       typedef typename _Alloc_traits::const_reference   const_reference;
      |                                                         ^~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:131:57: error: no type named 'pointer' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  131 |       typedef typename _Alloc_traits::pointer           pointer;
      |                                                         ^~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:132:57: error: no type named 'const_pointer' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  132 |       typedef typename _Alloc_traits::const_pointer     const_pointer;
      |                                                         ^~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:133:68: error: no type named 'pointer' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  133 |       typedef __gnu_cxx::__normal_iterator<pointer, basic_string>  iterator;
      |                                                                    ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:135:57: error: no type named 'const_pointer' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  135 |                                                         const_iterator;
      |                                                         ^~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:136:57: error: no type named 'const_pointer' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  136 |       typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:137:57: error: no type named 'pointer' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
  137 |       typedef std::reverse_iterator<iterator>           reverse_iterator;
      |                                                         ^~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In substitution of 'template<class _Alloc> using _RequireAllocator = typename std::enable_if<std::__is_allocator<_Alloc>::value, _Alloc>::type [with _Alloc = std::pmr::polymorphic_allocator<wchar_t>]':
/usr/local/include/c++/12.1.0/bits/basic_string.h:634:7:   required from 'class std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >'
p1628.cpp:222:42:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:807:11: error: no type named 'type' in 'struct std::enable_if<false, std::pmr::polymorphic_allocator<wchar_t> >'
  807 |     using _RequireAllocator
      |           ^~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h: In instantiation of 'class std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >':
p1628.cpp:222:42:   required from here
/usr/local/include/c++/12.1.0/bits/basic_string.h:2634:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
 2634 |         find(const _Tp& __svt, size_type __pos = 0) const
      |         ^~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2700:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
 2700 |         rfind(const _Tp& __svt, size_type __pos = npos) const
      |         ^~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2785:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
 2785 |         find_first_of(const _Tp& __svt, size_type __pos = 0) const
      |         ^~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2874:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
 2874 |         find_last_of(const _Tp& __svt, size_type __pos = npos) const
      |         ^~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:2962:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
 2962 |         find_first_not_of(const _Tp& __svt, size_type __pos = 0) const
      |         ^~~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/basic_string.h:3049:9: error: no type named 'size_type' in 'struct std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::pmr::polymorphic_allocator<wchar_t> >::_Alloc_traits_impl<std::char_traits<wchar_t>, void>'
 3049 |         find_last_not_of(const _Tp& __svt, size_type __pos = npos) const
      |         ^~~~~~~~~~~~~~~~
p1628.cpp:222:58: error: template argument 1 is invalid
  222 |     using wsmatch = match_results<wstring::const_iterator>;
      |     
```

# 検討事項(agenda)
コンパイルエラーを取るか、コンパイルエラーの理由を解説する。

<!-- リンクエラーの解説をする。clang++とg++の比較。意味のある出力。
コンパイルエラーを取るか、コンパイルエラーの理由を解説する。-->

## 応用例1　AUTOSAR C++

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

Autosar Guidelines C++14 example code compile list

https://qiita.com/kaizen_nagoya/items/8ccbf6675c3494d57a76

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

https://qiita.com/kaizen_nagoya/items/3436fbd49865e0da7d35

## 応用例2　MISRA C/C++

MISRA C まとめ #include <misra_c.h>

https://qiita.com/kaizen_nagoya/items/f1a79a7cbd281607c7c9

MISRA C++ 5-0-16

https://qiita.com/kaizen_nagoya/items/7df2d4e05db724752a74

## 応用例3 CERT C/C++

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

https://qiita.com/kaizen_nagoya/items/fe06719aef10f3f985ae

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

https://qiita.com/kaizen_nagoya/items/8dff19511e42b2593db1

## 応用例4 箱庭　
 箱庭もくもく会 

https://hakoniwa.connpass.com

第11回 未定

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

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

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

仮想戦略会議「箱庭」

https://qiita.com/kaizen_nagoya/items/73cb132707653176a461

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

https://qiita.com/kaizen_nagoya/items/a22bf2b1dab0ad3258d4

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

https://qiita.com/kaizen_nagoya/items/e3c0ceb2dcc9cf3f3fac


## 自己参考資料(self reference)

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

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

https://qiita.com/kaizen_nagoya/items/3f3992c9722c1cee2e3a

#include "N4910.h"

https://qiita.com/kaizen_nagoya/items/163a47cef7d6bb1c33a8

C++N4910資料の改善点

https://qiita.com/kaizen_nagoya/items/fb4ceb5d117a54641af3

dockerにclang

https://qiita.com/kaizen_nagoya/items/8829ffeee397eda50e80

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

https://qiita.com/kaizen_nagoya/items/059874ea39c4de64c0f7

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

https://qiita.com/kaizen_nagoya/items/74220c0577a512c2d7da

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

https://qiita.com/kaizen_nagoya/items/a63fb96d351ac5c16ff7

astyle 使ってみた

https://qiita.com/kaizen_nagoya/items/3c9a87a781d53a1a23f3

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

# 文書履歴(document history)
ver. 0.01 初稿 　20220918