Annex D (normative) Compatibility features [depr] C++N4910:2022 (718) p1806.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.

# Annex D (normative) Compatibility features [depr] C++N4910:2022 (718) p1806.cpp

## 算譜(source code)

```c++:p1806.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 = "Annex D (normative) Compatibility features [depr] C++N4910:2022 (718) p1806.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;

// D.1 General [depr.general]
//  This Annex describes features of the C++ Standard that are specified for compatibility with existing implementations.
//  These are deprecated features, where deprecated is defined as: Normative for the current revision of C++, but having been identified as a candidate for removal from future revisions. An implementation may declare library names and entities described in this Clause with the deprecated attribute (9.12.4).
// D.2 Arithmetic conversion on enumerations [depr.arith.conv.enum]
//  The ability to apply the usual arithmetic conversions (7.4) on operands where one is of enumeration type and the other is of a different enumeration type or a floating-point type is deprecated.
// [Note 1: Three-way comparisons (7.6.8) between such operands are ill-formed.  [Example 1:
enum E1 { e };
enum E2 { f };
bool b = e <= 3.7;
int k = f - e;
auto cmp = e <=> f;
// deprecated // deprecated // error
// D.3 Implicit capture of *this by reference [depr.capture.this]
//  For compatibility with prior revisions of C++, a lambda-expression with capture-default = (7.5.5.3) may implicitly capture *this by reference.
// [Example 1:
struct X {
    int x;
    void foo(int n) {
        auto f = [=]() {
            x = n;
        };
        auto g = [=, this]() {
            x = n;
        };
    }
};
// D.4 Array comparisons [depr.array.comp]
// deprecated: x means this->x, not a copy thereof // recommended replacement
//  Equality and relational comparisons (7.6.10, 7.6.9) between two operands of array type are deprecated. [Note 1: Three-way comparisons (7.6.8) between such operands are ill-formed. —end note]
// [Example 1:
int arr1[5];
int arr2[5];
bool same = arr1 == arr2;
auto cmp = arr1 <=> arr2;
// deprecated, same as &arr1[0] == &arr2[0], // does not compare array contents
// error
// D.5 Deprecated volatile types [depr.volatile.type]
//  Postfix ++ and -- expressions (7.6.1.6) and prefix ++ and -- expressions (7.6.2.3) of volatile-qualified arithmetic and pointer types are deprecated.
// [Example 1:
volatile int velociraptor;
++velociraptor; // deprecated
//  Certain assignments where the left operand is a volatile-qualified non-class type are deprecated; see 7.6.19.
// [Example 2:
int neck, tail;
volatile int brachiosaur;
brachiosaur = neck;
tail = brachiosaur;
tail = brachiosaur = neck;
brachiosaur += neck;
brachiosaur = brachiosaur + neck;
// OK
// OK
// deprecated // deprecated // OK
//  A function type (9.3.4.6) with a parameter with volatile-qualified type or with a volatile-qualified return type is deprecated.
// [Example 3:
volatile struct amber jurassic();
void trex(volatile short left_arm, volatile short right_arm);
void fly(volatile struct pterosaur* pteranodon);
// A structured binding (9.6) of a volatile-qualified type is deprecated.
// [Example 4:
struct linhenykus {
    short forelimb;
};
void park(linhenykus alvarezsauroid) {
    volatile auto [what_is_this] = alvarezsauroid;
// ...
}
// D.6 Redeclaration of static constexpr data members [depr.static.constexpr]
// deprecated // deprecated // OK
// deprecated
//  For compatibility with prior revisions of C++, a constexpr static data member may be redundantly redeclared outside the class with no initializer. This usage is deprecated.
// [Example 1:
struct A {
    static constexpr int n = 5;
};
constexpr int A::n;
// —end example]
// definition (declaration in C++ 2014)
// redundant declaration (definition in C++ 2014)
// D.7 Non-local use of TU-local entities [depr.local]
//  A declaration of a non-TU-local entity that is an exposure (6.6) is deprecated. [Note 1: Such a declaration in an importable module unit is ill-formed. [Example 1:
namespace {
struct A {
    void f() {}
};
}
A h();
inline void g() {
    A().f();
}
// deprecated: not internal linkage
// deprecated: inline and not internal linkage
// Requires: Type T is Cpp17EqualityComparable (Table 27). Returns: !(x == y).
// D.8 Implicit declaration of copy functions [depr.impldec]
// The implicit definition of a copy constructor (11.4.5.3) as defaulted is deprecated if the class has a user- declared copy assignment operator or a user-declared destructor (11.4.7). The implicit definition of a copy assignment operator (11.4.6) as defaulted is deprecated if the class has a user-declared copy constructor or a user-declared destructor. It is possible that future versions of C++ will specify that these implicit definitions are deleted (9.5.3).
// D.9 template keyword before qualified names [depr.template.template] 1 The use of the keyword template before the qualified name of a class or alias template without a template argument list is deprecated.
// D.10 Requires paragraph [depr.res.on.required]
// In addition to the elements specified in 16.3.2.4, descriptions of function semantics may also contain a Requires: element to denote the preconditions for calling a function.
//  Violation of any preconditions specified in a function’s Requires: element results in undefined behavior unless the function’s Throws: element specifies throwing an exception when the precondition is violated.
// D.11 Relational operators [depr.relops]
//  The header <utility> (22.2.1) has the following additions:
namespace std::rel_ops {
template<class T> bool operator!=(const T&, const T&);
template<class T> bool operator> (const T&, const T&);
template<class T> bool operator<=(const T&, const T&);
template<class T> bool operator>=(const T&, const T&);
}
// To avoid redundant definitions of operator!= out of operator== and operators >, <=, and >= out of operator<, the library provides the following:
template<class T> bool operator!=(const T& x, const T& y);
template<class T> bool operator>(const T& x, const T& y);
// Requires: Type T is Cpp17LessThanComparable (Table 28). Returns: y < x.
template<class T> bool operator<=(const T& x, const T& y);
// Requires: Type T is Cpp17LessThanComparable (Table 28). Returns: !(y < x).
template<class T> bool operator>=(const T& x, const T& y);
// Requires: Type T is Cpp17LessThanComparable (Table 28). Returns: !(x < y).
// D.12 char* streams [depr.str.strstreams]
// D.12.1 Header <strstream> synopsis reading and writing such objects. [depr.strstream.syn]
namespace std {
class strstreambuf;
class istrstream;
class ostrstream;
class strstream;
}
//  The header <strstream> defines types that associate stream buffers with character array objects and assist
// — allocated, set when a dynamic array object has been allocated, and hence will be freed by the destructor for the strstreambuf object;
// — constant, set when the array object has const elements, so the output sequence cannot be written;
// — dynamic, set when the array object is allocated (or reallocated) as necessary to hold a character sequence that can change in length;
// — frozen, set when the program has requested that the array object not be altered, reallocated, or freed
// D.12.2 Class strstreambuf  [depr.strstreambuf]
// D.12.2.1 General [depr.strstreambuf.general]
namespace std {
class strstreambuf : public basic_streambuf<char> {
public:
    strstreambuf() : strstreambuf(0) {}
    explicit strstreambuf(streamsize alsize_arg);
    strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
    strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
    strstreambuf(const char* gnext_arg, streamsize n);
    strstreambuf(signed char* gnext_arg, streamsize n,
                 signed char* pbeg_arg = nullptr);
    strstreambuf(const signed char* gnext_arg, streamsize n);
    strstreambuf(unsigned char* gnext_arg, streamsize n,
                 unsigned char* pbeg_arg = nullptr);
    strstreambuf(const unsigned char* gnext_arg, streamsize n);
    virtual ~strstreambuf();
    void  freeze(bool freezefl = true);
    char* str();
    int   pcount();
protected:
    int_type overflow (int_type c = EOF) override;
    int_type pbackfail(int_type c = EOF) override;
    int_type underflow() override;
    pos_type seekoff(off_type off, ios_base::seekdir way,
                     ios_base::openmode which = ios_base::in | ios_base::out) override;
    pos_type seekpos(pos_type sp,
                     ios_base::openmode which = ios_base::in | ios_base::out) override;
    streambuf* setbuf(char* s, streamsize n) override;
private:
    using strstate = T1;
    static const strstate allocated;
    static const strstate constant;
    static const strstate dynamic;
    static const strstate frozen;
    strstate strmode;
    streamsize alsize;
    void* (*palloc)(size_t);
    void (*pfree)(void*);
};
}
// exposition only // exposition only // exposition only // exposition only // exposition only // exposition only // exposition only // exposition only // exposition only
//  The class strstreambuf associates the input sequence, and possibly the output sequence, with an object of some character array type, whose elements store arbitrary values. The array object has several attributes.
//  [Note 1: For the sake of exposition, these are represented as elements of a bitmask type (indicated here as T1) called strstate. The elements are:
//  [Note 2: For the sake of exposition, the maintained data is presented here as:
// — strstate strmode, the attributes of the array object associated with the strstreambuf object;
// Effects: Initializes the base class with streambuf(). The postconditions of this function are indicated in Table 143.
// Table 143: strstreambuf(streamsize) effects [tab:depr.strstreambuf.cons.sz]
// Effects: Initializes the base class with streambuf(). The postconditions of this function are indicated in Table 144.
// Table 144: strstreambuf(void* (*)(size_t), void (*)(void*)) effects [tab:depr.strstreambuf.cons.alloc]
unsigned char* pbeg_arg = nullptr);
// Effects: Initializes the base class with streambuf(). The postconditions of this function are indicated in Table 145.
// Table 145: strstreambuf(charT*, streamsize, charT*) effects [tab:depr.strstreambuf.cons.ptr]
// gnext_arg shall point to the first element of an array object whose number of elements N is determined as follows:
// Each object of class strstreambuf has a seekable area, delimited by the pointers seeklow and seekhigh. If gnext is a null pointer, the seekable area is undefined. Otherwise, seeklow equals gbeg and seekhigh is either pend, if pend is not a null pointer, or gend.
// D.12.2.2 strstreambuf constructors [depr.strstreambuf.cons] explicit strstreambuf(streamsize alsize_arg);
// — int alsize, the suggested minimum size for a dynamic array object;
// — void* (*palloc)(size_t), points to the function to call to allocate a dynamic array object; — void (*pfree)(void*), points to the function to call to free a dynamic array object.
signed char* pbeg_arg = nullptr);
// Element Value strmode alsize palloc pfree dynamic alsize_arg a null pointer a null pointer
strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
//  Element Value strmode alsize palloc pfree dynamic an unspecified value palloc_arg pfree_arg
strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
strstreambuf(signed char* gnext_arg, streamsize n,
             signed char* pbeg_arg = nullptr);
strstreambuf(unsigned char* gnext_arg, streamsize n,  signed char* pbeg_arg = nullptr);
//  Element Value    strmode alsize palloc pfree an unspecified value a null pointer a null pointer
// — If n > 0, N is n.
// — If n == 0, N is std::strlen(gnext_arg).
// — If n < 0, N is INT_MAX.314
// If pbeg_arg is a null pointer, the function executes:
setg(gnext_arg, gnext_arg, gnext_arg + N);
// Otherwise, the function executes:
setg(gnext_arg, gnext_arg, pbeg_arg);
setp(pbeg_arg,  pbeg_arg + N);
strstreambuf(const char* gnext_arg, streamsize n);
strstreambuf(const signed char* gnext_arg, streamsize n);
strstreambuf(const unsigned char* gnext_arg, streamsize n);
// Effects: Behaves the same as strstreambuf((char*)gnext_arg,n), except that the constructor also sets constant in strmode.
virtual ~strstreambuf();
// Effects: Destroys an object of class strstreambuf. The function frees the dynamically allocated array object only if (strmode & allocated) != 0 and (strmode & frozen) == 0. (D.12.2.4 describes how a dynamically allocated array object is freed.)
// D.12.2.3 Member functions [depr.strstreambuf.members]
void freeze(bool freezefl = true);
// Effects: If strmode & dynamic is nonzero, alters the freeze status of the dynamic array object as follows:
— If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
char* str();
// Effects: Calls freeze(), then returns the beginning pointer for the input sequence, gbeg. Remarks: The return value can be a null pointer.
int pcount() const;
// Effects: If the next pointer for the output sequence, pnext, is a null pointer, returns zero. Otherwise, returns the current effective length of the array object as the next pointer minus the beginning pointer for the output sequence, pnext - pbeg.
// D.12.2.4 strstreambuf overridden virtual functions [depr.strstreambuf.virtuals]
int_type overflow(int_type c = EOF) override;
// Effects: Appends the character designated by c to the output sequence, if possible, in one of two ways:
// — If c != EOF and if either the output sequence has a write position available or the function makes a write position available (as described below), assigns c to *pnext++.
// Returns (unsigned char)c.
// — If c == EOF, there is no character to append.
// Returns a value other than EOF.
// Returns EOF to indicate failure.
// Remarks: The function can alter the number of write positions available as a result of any call.
// To make a write position available, the function reallocates (or initially allocates) an array object with a sufficient number of elements n to hold the current array object (if any), plus at least one additional write position. How many additional write positions are made available is otherwise unspecified.If palloc is not a null pointer, the function calls (*palloc)(n) to allocate the new dynamic array object.
//  314) The function signature strlen(const char*) is declared in <cstring> (23.5.3). The macro INT_MAX is defined in <climits> (17.3.6).
// Otherwise, it evaluates the expression new charT[n]. In either case, if the allocation fails, the function returns EOF. // Otherwise, it sets allocated in strmode.
// To free a previously existing dynamic array object whose first element address is p: If pfree is not a null pointer, the function calls (*pfree)(p). Otherwise, it evaluates the expression delete[]p.
// If (strmode & dynamic) == 0, or if (strmode & frozen) != 0, the function cannot extend the array (reallocate it with greater length) to make a write position available.
// Recommended practice: An implementation should consider alsize in making the decision how many additional write positions to make available.
int_type pbackfail(int_type c = EOF) override;
// Puts back the character designated by c to the input sequence, if possible, in one of three ways:
// — If c != EOF, if the input sequence has a putback position available, and if (char)c == gnext[-1], assigns gnext - 1 to gnext.
// Returns c.
// — If c != EOF, if the input sequence has a putback position available, and if strmode & constant is zero, assigns c to *--gnext.
// Returns c.
// — If c == EOF and if the input sequence has a putback position available, assigns gnext - 1 to gnext.
// Returns a value other than EOF. Returns EOF to indicate failure.
// Remarks: If the function can succeed in more than one of these ways, it is unspecified which way is chosen. The function can alter the number of putback positions available as a result of any call.
int_type underflow() override;
// Effects: Reads a character from the input sequence, if possible, without moving the stream position past it, as follows:
// — If the input sequence has a read position available, the function signals success by returning (unsigned char)*gnext.
// — Otherwise, if the current write next pointer pnext is not a null pointer and is greater than the current read end pointer gend, makes a read position available by assigning to gend a value greater than gnext and no greater than pnext.
// Returns (unsigned char)*gnext.
// Returns EOF to indicate failure.
// Remarks: The function can alter the number of read positions available as a result of any call.
pos_type seekoff(off_type off, seekdir way, openmode which = in | out) override;
//   Conditions Result
//    (which & ios::in) != 0 positions the input sequence
//   (which & ios::out) != 0 positions the output sequence
//   (which & (ios::in | ios::out)) == positions both the input and the output sequences (ios::in | ios::out) and either
// way == ios::beg or way == ios::end
//   Otherwise the positioning operation fails.
// Effects: Alters the stream position within one of the controlled sequences, if possible, as indicated in Table 146.
// Table 146: seekoff positioning  [tab:depr.strstreambuf.seekoff.pos]
// For a sequence to be positioned, if its next pointer is a null pointer, the positioning operation fails. Otherwise, the function determines newoff as indicated in Table 147.
//    Condition newoff Value
//    way == ios::beg 0
//   way == ios::cur the next pointer minus the begin- ning pointer (xnext - xbeg).
//   way == ios::end seekhigh minus the beginning pointer (seekhigh - xbeg).
// Table 147: newoff values [tab:depr.strstreambuf.seekoff.newoff]
// If (newoff + off) < (seeklow - xbeg) or (seekhigh - xbeg) < (newoff + off), the positioning operation fails. Otherwise, the function assigns xbeg + newoff + off to the next pointer xnext.
// Returns: pos_type(newoff), constructed from the resultant offset newoff (of type off_type), that stores the resultant stream position, if possible. If the positioning operation fails, or if the constructed object cannot represent the resultant stream position, the return value is pos_type(off_type(-1)).
pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out) override;
// Effects: Alters the stream position within one of the controlled sequences, if possible, to correspond to the stream position stored in sp (as described below).
// — If (which & ios::in) != 0, positions the input sequence.
// — If (which & ios::out) != 0, positions the output sequence.
// — If the function positions neither sequence, the positioning operation fails.
// For a sequence to be positioned, if its next pointer is a null pointer, the positioning operation fails. Otherwise, the function determines newoff from sp.offset():{
// — If newoff is an invalid stream position, has a negative value, or has a value greater than (seekhigh - seeklow), the positioning operation fails
// — Otherwise, the function adds newoff to the beginning pointer xbeg and stores the result in the next pointer xnext.
// Returns: pos_type(newoff), constructed from the resultant offset newoff (of type off_type), that stores the resultant stream position, if possible. If the positioning operation fails, or if the constructed object cannot represent the resultant stream position, the return value is pos_type(off_type(-1)).
streambuf<char>* setbuf(char* s, streamsize n) override;
// }
// Effects: Behavior is implementation-defined, except that setbuf(0, 0) has no effect.
// D.12.3 Class istrstream
// D.12.3.1 General
namespace std {
class istrstream : public basic_istream<char> {
public:
    explicit istrstream(const char* s);
    explicit istrstream(char* s);
    istrstream(const char* s, streamsize n);
    istrstream(char* s, streamsize n);
    virtual ~istrstream();
    strstreambuf* rdbuf() const;
    char* str();
private:
    strstreambuf sb; // exposition only
};
}
// [depr.istrstream] [depr.istrstream.general]
//  The class istrstream supports the reading of objects of class strstreambuf. It supplies a strstreambuf object to control the associated array object. For the sake of exposition, the maintained data is presented here as:
// — sb, the strstreambuf object. D.12.3.2 istrstream constructors
explicit istrstream(const char* s);
explicit istrstream(char* s);
// [depr.istrstream.cons]
// — sb, the strstreambuf object.
// Effects: Initializes the base class with istream(&sb) and sb with strstreambuf(s, 0). s shall designate the first element of an ntbs.
istrstream(const char* s, streamsize n);
istrstream(char* s, streamsize n);
// Effects: Initializes the base class with istream(&sb) and sb with strstreambuf(s, n). s shall designate the first element of an array whose length is n elements, and n shall be greater than zero.
// D.12.3.3 Member functions
strstreambuf* rdbuf() const;
// Returns: const_cast<strstreambuf*>(&sb). char* str();
// [depr.istrstream.members]
// [depr.ostrstream] [depr.ostrstream.general]
// Returns: rdbuf()->str().
// D.12.4 Class ostrstream
// D.12.4.1 General
namespace std {
class ostrstream : public basic_ostream<char> {
public:
    ostrstream();
    ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
    virtual ~ostrstream();
    strstreambuf* rdbuf() const;
    void freeze(bool freezefl = true);
    char* str();
    int pcount() const;
private:
    strstreambuf sb;
};
}
// exposition only
//  The class ostrstream supports the writing of objects of class strstreambuf. It supplies a strstreambuf object to control the associated array object. For the sake of exposition, the maintained data is presented here as:
// D.12.4.2 ostrstream constructors [depr.ostrstream.cons]
ostrstream();
// Effects: Initializes the base class with ostream(&sb) and sb with strstreambuf().
ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
// Effects: Initializes the base class with ostream(&sb), and sb with one of two constructors:
// — If (mode & app) == 0, then s shall designate the first element of an array of n elements. The constructor is strstreambuf(s, n, s).
// — If (mode & app) != 0, then s shall designate the first element of an array of n elements that contains an ntbs whose first element is designated by s. The constructor is strstreambuf(s, n, s + std::strlen(s)).315
//  315) The function signature strlen(const char*) is declared in <cstring> (23.5.3).
// — sb, the strstreambuf object.
// Returns: rdbuf()->pcount().
// D.12.5 Class strstream
// D.12.5.1 General
namespace std {
class strstream
    : public basic_iostream<char> {
public:
// types
    using char_type = char;
    using int_type  = char_traits<char>::int_type;
    using pos_type  = char_traits<char>::pos_type;
    using off_type  = char_traits<char>::off_type;
// constructors/destructor
    strstream();
    strstream(char* s, int n,
              ios_base::openmode mode = ios_base::in|ios_base::out);
    virtual ~strstream();
// members
    strstreambuf* rdbuf() const;
    void freeze(bool freezefl = true);
    int pcount() const;
    char* str();
private:
    strstreambuf sb; // exposition only
};
}
// D.12.4.3 Member functions
strstreambuf* rdbuf() const;
// Returns: (strstreambuf*)&sb. void freeze(bool freezefl = true);
// Effects: Calls rdbuf()->freeze(freezefl). char* str();
// Returns: rdbuf()->str(). int pcount() const;
// [depr.ostrstream.members]
//  The class strstream supports reading and writing from objects of class strstreambuf. It supplies a strstreambuf object to control the associated array object. For the sake of exposition, the maintained data is presented here as:
// D.12.5.2 strstream constructors [depr.strstream.cons]
strstream();
// Effects: Initializes the base class with iostream(&sb). strstream(char* s, int n,
ios_base::openmode mode = ios_base::in|ios_base::out);
// Effects: Initializes the base class with iostream(&sb), and sb with one of the two constructors: If (mode & app) == 0, then s shall designate the first element of an array of n elements. The constructor is strstreambuf(s,n,s).
// If (mode & app) != 0, then s shall designate the first element of an array of n elements that contains an ntbs whose first element is designated by s. The constructor is strstreambuf(s,n,s
+ std::strlen(s)).
// [depr.strstream] [depr.strstream.general]
// D.12.5.3 strstream destructor
    virtual ~strstream();
//  The following member is defined in addition to those specified in 20.2.9:
    namespace std {
template<class T> class allocator {
public:
    using is_always_equal = true_type;
};
}
// D.14 Deprecated polymorphic_allocator member function [depr.mem.poly.allocator.mem]
// Effects: Destroys an object of class strstream.
// D.12.5.4 strstream operations [depr.strstream.oper]
strstreambuf* rdbuf() const;
// Returns: const_cast<strstreambuf*>(&sb). void freeze(bool freezefl = true);
// Effects: Calls rdbuf()->freeze(freezefl). char* str();
// Returns: rdbuf()->str(). int pcount() const;
// Returns: rdbuf()->pcount().
// D.13 The default allocator [depr.default.allocator]
//  The following member is declared in addition to those members specified in 20.4.3.3:
namespace std::pmr {
template<class Tp = byte>
class polymorphic_allocator {
public:
    template <class T>
    void destroy(T* p);
};
}
template<class T>
void destroy(T* p);
// Effects: As if by p->~T().
//  The header <type_traits> (21.3.3) has the following addition:
namespace std {
template<class T> struct is_pod;
template<class T> inline constexpr bool is_pod_v = is_pod<T>::value;
template<size_t Len, size_t Align = default-alignment > // see below
struct aligned_storage;
template<size_t Len, size_t Align = default-alignment > // see below
using aligned_storage_t = typename aligned_storage<Len, Align>::type;
template<size_t Len, class... Types>
struct aligned_union;
template<size_t Len, class... Types>
using aligned_union_t = typename aligned_union<Len, Types...>::type;
}
// D.15 Deprecated type traits [depr.meta.types]
// Requires: remove_all_extents_t<T> shall be a complete type or cv void.is_pod<T> is a Cpp17UnaryTypeTrait (21.3.2) with a base characteristic of true_type if T is a POD type, and false_type otherwise. A POD class is a class that is both a trivial class and a standard-layout class, and has no non-static data members of type non-POD class (or array thereof). A POD type is a scalar type, a POD class, an array of such a type, or a cv-qualified version of one of these types.
// Let TS denote tuple_size<T> of the cv-unqualified type T. If the expression TS::value is well-formed when treated as an unevaluated operand (7.2.3), then specializations of each of the two templates meet the Cpp17TransformationTrait requirements with a base characteristic of integral_constant<size_t, TS::value>. Otherwise, they have no member value.
// Access checking is performed as if in a context unrelated to TS and T. Only the validity of the immediate context of the expression is considered.
//  The behavior of a program that adds specializations for any of the templates defined in this subclause is undefined, unless explicitly permitted by the specification of the corresponding template.
template<class T> struct is_pod;
// [Note 1: It is unspecified whether a closure type (7.5.5.2) is a POD type.
    template<size_t Len, size_t Align = default-alignment>
    struct aligned_storage;
// The value of default-alignment is the most stringent alignment requirement for any object type whose size is no greater than Len (6.8).
// Mandates: Len is not zero. Align is equal to alignof(T) for some type T or to default-alignment . The member typedef type is a trivial standard-layout type suitable for use as uninitialized storage for any object whose size is at most Len and whose alignment is a divisor of Align.
        [// Note 2: Uses of aligned_storage<Len, Align>::type can be replaced by an array std::byte[Len] declared with alignas(Align).
// [Note 3: A typical implementation would define aligned_storage as:
            template<size_t Len, size_t Alignment>
            struct aligned_storage {
               typedef struct {
                   alignas(Alignment) unsigned char __data[Len];
               } type; };
   template<size_t Len, class... Types>
   struct aligned_union;
// Mandates: At least one type is provided. Each type in the template parameter pack Types is a complete object type.
// The member typedef type is a trivial standard-layout type suitable for use as uninitialized storage for any object whose type is listed in Types; its size shall be at least Len. The static member alignment_- value is an integral constant of type size_t whose value is the strictest alignment of all types listed in Types.
//  The header <tuple> (22.4.2) has the following additions:
       namespace std {
       template<class T> class tuple_size<volatile T>;
       template<class T> class tuple_size<const volatile T>;
       template<size_t I, class T> class tuple_element<I, volatile T>;
       template<size_t I, class T> class tuple_element<I, const volatile T>;
       }
   template<class T> class tuple_size<volatile T>;
       template<class T> class tuple_size<const volatile T>;
// D.16 Tuple [depr.tuple]
// Let VS denote variant_size<T> of the cv-unqualified type T. Then specializations of each of the two templates meet the Cpp17UnaryTypeTrait requirements with a base characteristic of integral_- constant<size_t, VS::value>.
// In addition to being available via inclusion of the <tuple> (22.4.2) header, the two templates are available when any of the headers <array> (24.3.2), <ranges> (26.2), or <utility> (22.2.1) are included.
//  The header <variant> (22.6.2) has the following additions:
           namespace std {
           template<class T> struct variant_size<volatile T>;
           template<class T> struct variant_size<const volatile T>;
           template<size_t I, class T> struct variant_alternative<I, volatile T>;
           template<size_t I, class T> struct variant_alternative<I, const volatile T>;
           }
   template<class T> class variant_size<volatile T>;
       template<class T> class variant_size<const volatile T>;
           template<size_t I, class T> class tuple_element<I, volatile T>;
               template<size_t I, class T> class tuple_element<I, const volatile T>;
// Let TE denote tuple_element_t<I, T> of the cv-unqualified type T. Then specializations of each of the two templates meet the Cpp17TransformationTrait requirements with a member typedef type that names the following type:
// — for the first specialization, add_volatile_t<TE>, and
// — for the second specialization, add_cv_t<TE>.
// In addition to being available via inclusion of the <tuple> (22.4.2) header, the two templates are available when any of the headers <array> (24.3.2), <ranges> (26.2), or <utility> (22.2.1) are included.
// D.17 Variant [depr.variant]
                   template<size_t I, class T> class variant_alternative<I, volatile T>;
                       template<size_t I, class T> class variant_alternative<I, const volatile T>;
                       };
   }
// Let VA denote variant_alternative<I, T> of the cv-unqualified type T. Then specializations of each of the two templates meet the Cpp17TransformationTrait requirements with a member typedef type that names the following type:
// — for the first specialization, add_volatile_t<VA::type>, and — for the second specialization, add_cv_t<VA::type>.
// D.18 Deprecated iterator class template [depr.iterator] 1 The header <iterator> (25.2) has the following addition:
   namespace std {
   template<class Category, class T, class Distance = ptrdiff_t,
         class Pointer = T*, class Reference = T&>
   struct iterator {
       using iterator_category = Category;
       using value_type = T;
       using difference_type = Distance;
       using pointer = Pointer;
       using reference = Reference;
   }
//  The iterator template may be used as a base class to ease the definition of required types for new iterators.
//  [Note 1: If the new iterator type is a class template, then these aliases will not be visible from within the iterator class’s template definition, but only to callers of that class.
//  [Example 1: If a C++ program wants to define a bidirectional iterator for some data structure containing double and such that it works on a large memory model of the implementation, it can do so with:
// Returns: current.
// class MyIterator :
   public iterator<bidirectional_iterator_tag, double, long, T*, T&> { // code implementing ++, etc.
   };}
// D.19 Deprecated move_iterator access
//  The following member is declared in addition to those members specified in 25.5.3.6:
   namespace std {
   template<class Iterator>
   class move_iterator {
   public:
       constexpr pointer operator->() const;
};
}
constexpr pointer operator->() const;
// D.20 Deprecated shared_ptr atomic access [depr.util.smartptr.shared.atomic]
//  The header <memory> (20.2.2) has the following additions:
namespace std {
template<class T>
bool atomic_is_lock_free(const shared_ptr<T>* p);
template<class T>
shared_ptr<T> atomic_load(const shared_ptr<T>* p);
template<class T>
shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
template<class T>
void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
template<class T>
void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
template<class T>
shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
template<class T>
shared_ptr<T> atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
template<class T>
bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
template<class T>
bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
template<class T>
bool atomic_compare_exchange_weak_explicit(
    shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
    memory_order success, memory_order failure);
template<class T>
bool atomic_compare_exchange_strong_explicit(
    shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
    memory_order success, memory_order failure);
}
// Concurrent access to a shared_ptr object from multiple threads does not introduce a data race if the access is done exclusively via the functions in this subclause and the instance is passed as their first argument.
// The meaning of the arguments of type memory_order is explained in 33.5.4.
template<class T> bool atomic_is_lock_free(const shared_ptr<T>* p);
// Requires: p shall not be null.
// Returns: true if atomic access to *p is lock-free, false otherwise.
// [depr.move.iter.elem]
// Requires: p shall not be null.
// Returns: atomic_load_explicit(p, memory_order::seq_cst). Throws: Nothing.
// Throws: Nothing.
template<class T> shared_ptr<T> atomic_load(const shared_ptr<T>* p);
template<class T> shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
// Requires: p shall not be null.
// Requires: mo shall not be memory_order::release or memory_order::acq_rel. Returns: *p.
// Throws: Nothing.
template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
// Requires: p shall not be null.
// Effects: As if by atomic_store_explicit(p, r, memory_order::seq_cst). Throws: Nothing.
template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
// Requires: p shall not be null.
// Requires: mo shall not be memory_order::acquire or memory_order::acq_rel. Effects: As if by p->swap(r).
// Throws: Nothing.
template<class T> shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
// Requires: p shall not be null.
// Returns: atomic_exchange_explicit(p, r, memory_order::seq_cst). Throws: Nothing.
template<class T>
shared_ptr<T> atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
// Requires: p shall not be null. Effects: As if by p->swap(r). // Returns: The previous value of *p. Throws: Nothing.
template<class T>
bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
// Requires: p shall not be null and v shall not be null. Returns:
atomic_compare_exchange_weak_explicit(p, v, w, memory_order::seq_cst, memory_order::seq_cst)
// Throws: Nothing. template<class T>
bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
// Returns: atomic_compare_exchange_strong_explicit(p, v, w, memory_order::seq_cst,
template<class T>
bool atomic_compare_exchange_weak_explicit(
    shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
    memory_order success, memory_order failure);
memory_order::seq_cst)
template<class T>
bool atomic_compare_exchange_strong_explicit(
    shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
    memory_order success, memory_order failure);
// Requires: p shall not be null and v shall not be null. The failure argument shall not be memory_- order::release nor memory_order::acq_rel.
// Effects: If *p is equivalent to *v, assigns w to *p and has synchronization semantics corresponding to the value of success, otherwise assigns *p to *v and has synchronization semantics corresponding to the value of failure.
// Returns: true if *p was equivalent to *v, false otherwise. // Throws: Nothing.
// Remarks: Two shared_ptr objects are equivalent if they store the same pointer value and share ownership. The weak form may fail spuriously. See 33.5.8.2.
// D.21 Deprecated basic_string capacity [depr.string.capacity] //  The following member is declared in addition to those members specified in 23.4.3.5:
namespace std {
template<class charT, class traits = char_traits<charT>,
         class Allocator = allocator<charT>>
class basic_string {
public:
    void reserve();
};
}
void reserve();
// Effects: After this call, capacity() has an unspecified value greater than or equal to size(). [Note 1: This is a non-binding shrink to fit request. —end note]
// The header <codecvt> provides code conversion facets for various character encodings.
// D.22 Deprecated standard code conversion facets [depr.locale.stdcvt]
// D.22.1 General [depr.locale.stdcvt.general]
// D.22.2 Header <codecvt> synopsis
namespace std {
enum codecvt_mode {
    consume_header = 4,
    generate_header = 2,
    little_endian = 1
};
template<class Elem, unsigned long Maxcode = 0x10ffff, codecvt_mode Mode = (codecvt_mode)0>
class codecvt_utf8 : public codecvt<Elem, char, mbstate_t> {
public:
    explicit codecvt_utf8(size_t refs = 0);
    ~codecvt_utf8();
};
template<class Elem, unsigned long Maxcode = 0x10ffff, codecvt_mode Mode = (codecvt_mode)0>
class codecvt_utf16 : public codecvt<Elem, char, mbstate_t> {
public:
    explicit codecvt_utf16(size_t refs = 0);
    ~codecvt_utf16();
};
template<class Elem, unsigned long Maxcode = 0x10ffff, codecvt_mode Mode = (codecvt_mode)0>
class codecvt_utf8_utf16 : public codecvt<Elem, char, mbstate_t> {
public:
    explicit codecvt_utf8_utf16(size_t refs = 0);
// [depr.codecvt.syn]
// — Elem is the wide-character type, such as wchar_t, char16_t, or char32_t.
// — Maxcode is the largest wide-character code that the facet will read or write without reporting a conversion error.
// — If (Mode & consume_header), the facet shall consume an initial header sequence, if present, when reading a multibyte sequence to determine the endianness of the subsequent multibyte sequence to be read.
// — If (Mode & generate_header), the facet shall generate an initial header sequence when writing a multibyte sequence to advertise the endianness of the subsequent multibyte sequence to be written.
// — If (Mode & little_endian), the facet shall generate a multibyte sequence in little-endian order, as opposed to the default big-endian order.
// — The facet shall convert between UTF-8 multibyte sequences and UCS-2 or UTF-32 (depending on the size of Elem) within the program.
// — Endianness shall not affect how multibyte sequences are read or written.
    ~codecvt_utf8_utf16();
};
}
// D.22.3 Requirements [depr.locale.stdcvt.req]
//  For each of the three code conversion facets codecvt_utf8, codecvt_utf16, and codecvt_utf8_utf16:
//  For the facet codecvt_utf8:
// — The multibyte sequences may be written as either a text or a binary file. 3 For the facet codecvt_utf16:
// — The facet shall convert between UTF-16 multibyte sequences and UCS-2 or UTF-32 (depending on the size of Elem) within the program.
// — Multibyte sequences shall be read or written according to the Mode flag, as set out above.
// — The multibyte sequences may be written only as a binary file. Attempting to write to a text file produces undefined behavior. 4 For the facet codecvt_utf8_utf16:
// — The facet shall convert between UTF-8 multibyte sequences and UTF-16 (one or two 16-bit codes) within the program.
// — Endianness shall not affect how multibyte sequences are read or written.
//  The header <locale> (30.2) has the following additions:
namespace std {
template<class Codecvt, class Elem = wchar_t,
         class WideAlloc = allocator<Elem>,
         class ByteAlloc = allocator<char>>
class wstring_convert;
template<class Codecvt, class Elem = wchar_t,
         class Tr = char_traits<Elem>>
class wbuffer_convert;
}
// 316) Cancelled and replaced by ISO/IEC 10646:2017.
// — The multibyte sequences may be written as either a text or a binary file.
//  The encoding forms UTF-8, UTF-16, and UTF-32 are specified in ISO/IEC 10646. The encoding form UCS-2 is specified in ISO/IEC 10646:2003.316
// D.23 Deprecated convenience conversion interfaces
// D.23.1 General
// [depr.conversions] [depr.conversions.general]
// D.23.2 Class template wstring_convert [depr.conversions.string]
//  Class template wstring_convert performs conversions between a wide string and a byte string. It lets you specify a code conversion facet (like class template codecvt) to perform the conversions, without affecting any streams or locales.
// [Example 1: If you want to use the code conversion facet codecvt_utf8 to output to cout a UTF-8 multibyte sequence corresponding to a wide string, but you don’t want to alter the locale for cout, you can write something like:
wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
std::string mbstring = myconv.to_bytes(L"Hello\n");
std::cout << mbstring;
namespace std {
template<class Codecvt, class Elem = wchar_t,
         class WideAlloc = allocator<Elem>,
         class ByteAlloc = allocator<char>>
class wstring_convert {
public:
    using byte_string = basic_string<char, char_traits<char>, ByteAlloc>;
    using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
    using state_type  = typename Codecvt::state_type;
    using int_type    = typename wide_string::traits_type::int_type;
    wstring_convert() : wstring_convert(new Codecvt) {}
    explicit wstring_convert(Codecvt* pcvt);
    wstring_convert(Codecvt* pcvt, state_type state);
    explicit wstring_convert(const byte_string& byte_err,
                             const wide_string& wide_err = wide_string());
    ~wstring_convert();
    wstring_convert(const wstring_convert&) = delete;
    wstring_convert& operator=(const wstring_convert&) = delete;
    wide_string from_bytes(char byte);
    wide_string from_bytes(const char* ptr);
    wide_string from_bytes(const byte_string& str);
    wide_string from_bytes(const char* first, const char* last);
    byte_string to_bytes(Elem wchar);
    byte_string to_bytes(const Elem* wptr);
    byte_string to_bytes(const wide_string& wstr);
    byte_string to_bytes(const Elem* first, const Elem* last);
    size_t converted() const noexcept;
    state_type state() const;
private:
    byte_string byte_err_string;
    wide_string wide_err_string;
    Codecvt* cvtptr;
    state_type cvtstate;
    size_t cvtcount;
};
}
// exposition only // exposition only // exposition only // exposition only // exposition only
//  The class template describes an object that controls conversions between wide string objects of class basic_- string<Elem, char_traits<Elem>, WideAlloc> and byte string objects of class basic_string<char, char_traits<char>, ByteAlloc>. The class template defines the types wide_string and byte_string as synonyms for these two types. Conversion between a sequence of Elem values (stored in a wide_string object) and multibyte sequences (stored in a byte_string object) is performed by an object of class Codecvt, which meets the requirements of the standard code-conversion facet codecvt<Elem, char, mbstate_t>.
//  An object of this class template stores:
// — byte_err_string — a byte string to display on errors
// — wide_err_string — a wide string to display on errors
// — cvtptr — a pointer to the allocated conversion object (which is freed when the wstring_convert object is destroyed)
// — cvtstate — a conversion state object — cvtcount — a conversion count using byte_string = basic_string<char, char_traits<char>, ByteAlloc>;
// The type shall be a synonym for basic_string<char, char_traits<char>, ByteAlloc>. size_t converted() const noexcept;
// Returns: cvtcount.
wide_string from_bytes(char byte);
wide_string from_bytes(const char* ptr);
wide_string from_bytes(const byte_string& str);
wide_string from_bytes(const char* first, const char* last);
// Effects: The first member function shall convert the single-element sequence byte to a wide string. The second member function shall convert the null-terminated sequence beginning at ptr to a wide string. The third member function shall convert the sequence stored in str to a wide string. The fourth member function shall convert the sequence defined by the range [first, last) to a wide string.
// In all cases:— If the cvtstate object was not constructed with an explicit value, it shall be set to its default value (the initial conversion state) before the conversion begins. Otherwise it shall be left unchanged.
// — The number of input elements successfully converted shall be stored in cvtcount.
// Returns: If no conversion error occurs, the member function shall return the converted wide string. Otherwise, if the object was constructed with a wide-error string, the member function shall return the wide-error string. Otherwise, the member function throws an object of class range_error.
using int_type = typename wide_string::traits_type::int_type;
// The type shall be a synonym for wide_string::traits_type::int_type. state_type state() const;
// Returns: cvtstate.
using state_type = typename Codecvt::state_type;
// The type shall be a synonym for Codecvt::state_type.
byte_string to_bytes(Elem wchar);
byte_string to_bytes(const Elem* wptr);
byte_string to_bytes(const wide_string& wstr);
byte_string to_bytes(const Elem* first, const Elem* last);
// Effects: The first member function shall convert the single-element sequence wchar to a byte string. The second member function shall convert the null-terminated sequence beginning at wptr to a byte string. The third member function shall convert the sequence stored in wstr to a byte string. The fourth member function shall convert the sequence defined by the range [first, last) to a byte string. In all cases:
// — If the cvtstate object was not constructed with an explicit value, it shall be set to its default value (the initial conversion state) before the conversion begins. Otherwise it shall be left unchanged.
// — The number of input elements successfully converted shall be stored in cvtcount.
// Returns: If no conversion error occurs, the member function shall return the converted byte string. Otherwise, if the object was constructed with a byte-error string, the member function shall return the byte-error string. Otherwise, the member function shall throw an object of class range_error.
using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
// The type shall be a synonym for basic_string<Elem, char_traits<Elem>, WideAlloc>.
// — bufptr — a pointer to its underlying byte stream buffer
// — cvtptr — a pointer to the allocated conversion object (which is freed when the wbuffer_convert object is destroyed)
// — cvtstate — a conversion state object
explicit wstring_convert(Codecvt* pcvt);
wstring_convert(Codecvt* pcvt, state_type state);
explicit wstring_convert(const byte_string& byte_err,
                         const wide_string& wide_err = wide_string());
// Requires: For the first and second constructors, pcvt != nullptr.
// Effects: The first constructor shall store pcvt in cvtptr and default values in cvtstate, byte_- err_string, and wide_err_string. The second constructor shall store pcvt in cvtptr, state in cvtstate, and default values in byte_err_string and wide_err_string; moreover the stored state shall be retained between calls to from_bytes and to_bytes. The third constructor shall store new Codecvt in cvtptr, state_type() in cvtstate, byte_err in byte_err_string, and wide_err in wide_err_string.
//  Class template wbuffer_convert looks like a wide stream buffer, but performs all its I/O through an underlying byte stream buffer that you specify when you construct it. Like class template wstring_convert, it lets you specify a code conversion facet to perform the conversions, without affecting any streams or locales.
namespace std {
template<class Codecvt, class Elem = wchar_t, class Tr = char_traits<Elem>>
class wbuffer_convert : public basic_streambuf<Elem, Tr> {
public:
    using state_type = typename Codecvt::state_type;
    wbuffer_convert() : wbuffer_convert(nullptr) {}
    explicit wbuffer_convert(streambuf* bytebuf,
                             Codecvt* pcvt = new Codecvt,
                             state_type state = state_type());
    ~wbuffer_convert();
    wbuffer_convert(const wbuffer_convert&) = delete;
    wbuffer_convert& operator=(const wbuffer_convert&) = delete;
    streambuf* rdbuf() const;
    streambuf* rdbuf(streambuf* bytebuf);
    ~wstring_convert();
// Effects: The destructor shall delete cvtptr.
// D.23.3 Class template wbuffer_convert [depr.conversions.buffer]
};
}
state_type state() const;
private:
    streambuf* bufptr;
    Codecvt* cvtptr;
    state_type cvtstate;
// exposition only // exposition only // exposition only
//  The class template describes a stream buffer that controls the transmission of elements of type Elem, whose character traits are described by the class Tr, to and from a byte stream buffer of type streambuf. Conversion between a sequence of Elem values and multibyte sequences is performed by an object of class Codecvt, which shall meet the requirements of the standard code-conversion facet codecvt<Elem, char, mbstate_t>.
//  An object of this class template stores:
    state_type state() const;
// Returns: cvtstate.
// Requires: The source and [first, last) sequences are UTF-8 encoded. The value type of Source and InputIterator is char or char8_t. Source meets the requirements specified in 31.12.6.4.
// Returns: — If value_type is char and the current native narrow encoding (31.12.6.3.2) is UTF-8, return path(source) or path(first, last);  otherwise,
// — if value_type is wchar_t and the native wide encoding is UTF-16, or if value_type is char16_t or char32_t, convert source or [first,last) to a temporary, tmp, of type string_type and return path(tmp); otherwise,
// — convert source or [first, last) to a temporary, tmp, of type u32string and return path(tmp). Remarks: Argument format conversion (31.12.6.3.1) applies to the arguments for these functions. How Unicode encoding conversions are performed is unspecified.
// [Example 1: A string is to be read from a database that is encoded in UTF-8, and used to create a directory using the native encoding for filenames:
    namespace fs = std::filesystem;
        std::string utf8_string = read_utf8_data();
        fs::create_directory(fs::u8path(utf8_string));
        streambuf* rdbuf() const;
// Returns: bufptr.
//  The ctype locale category includes the following facets as if they were specified in table Table 100 of 30.3.1.2.1. codecvt<char16_t, char, mbstate_t>
        codecvt<char32_t, char, mbstate_t>
//  The ctype locale category includes the following facets as if they were specified in table Table 101 of 30.3.1.2.1. codecvt_byname<char16_t, char, mbstate_t>
        codecvt_byname<char32_t, char, mbstate_t>
//  The following class template specializations are required in addition to those specified in 30.4.2.5. The specialization codecvt<char16_t, char, mbstate_t> converts between the UTF-16 and UTF-8 encoding forms, and the specialization codecvt<char32_t, char, mbstate_t> converts between the UTF-32 and UTF-8 encoding forms.
        streambuf* rdbuf(streambuf* bytebuf);
// Effects: Stores bytebuf in bufptr. Returns: The previous value of bufptr.
        using state_type = typename Codecvt::state_type;
// The type shall be a synonym for Codecvt::state_type.
        explicit wbuffer_convert(
            streambuf* bytebuf,
            Codecvt* pcvt = new Codecvt,
        state_type state = state_type());
// Requires: pcvt != nullptr.
// Effects: The constructor constructs a stream buffer object, initializes bufptr to bytebuf, initializes
        cvtptr to pcvt, and initializes cvtstate to state. ~wbuffer_convert();
// Effects: The destructor shall delete cvtptr.
// D.24 Deprecated locale category facets [depr.locale.category]
// D.25 Deprecated filesystem path factory functions [depr.fs.path.factory]
        template<class Source>
        path u8path(const Source& source);
        template<class InputIterator>
        path u8path(InputIterator first, InputIterator last);
// For POSIX-based operating systems with the native narrow encoding set to UTF-8, no encoding or type conversion occurs.
// For POSIX-based operating systems with the native narrow encoding not set to UTF-8, a conversion to UTF-32 occurs, followed by a conversion to the current native narrow encoding. Some Unicode characters may have no native character set representation.
// For Windows-based operating systems a conversion from UTF-8 to UTF-16 occurs.
// [Note 1: The example above is representative of a historical use of filesystem::u8path. To indicate a UTF-8 encoding, passing a std::u8string to path’s constructor is preferred as it is consistent with path’s handling of other encodings.
// D.26 Deprecated atomic operations [depr.atomics]
// D.26.1 General [depr.atomics.general]
//  The header <atomic> (33.5.2) has the following additions.
        namespace std {
                template<class T>
            void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
            template<class T>
            void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
#define ATOMIC_VAR_INIT(value) see_below
#define ATOMIC_FLAG_INIT see_below
                    }
// D.26.2 Volatile access [depr.atomics.volatile]
//  If an atomic specialization has one of the following overloads, then that overload participates in overload resolution even if atomic<T>::is_always_lock_free is false:
            void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
            T operator=(T desired) volatile noexcept;
            T load(memory_order order = memory_order::seq_cst) const volatile noexcept;
            operator T() const volatile noexcept;
            T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
            bool compare_exchange_weak(T& expected, T desired,
                                       memory_order success, memory_order failure) volatile noexcept;
            bool compare_exchange_strong(T& expected, T desired,
                                         memory_order success, memory_order failure) volatile noexcept;
            bool compare_exchange_weak(T& expected, T desired,
                                       memory_order order = memory_order::seq_cst) volatile noexcept;
            bool compare_exchange_strong(T& expected, T desired,
                                         memory_order order = memory_order::seq_cst) volatile noexcept;
            T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
            T operator op=(T operand) volatile noexcept;
            T* fetch_key(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;
// D.26.3 Non-member functions [depr.atomics.nonmembers]
            template<class T>
            void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
            template<class T>
            void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
// Effects: Equivalent to: atomic_store_explicit(object, desired, memory_order::relaxed); D.26.4 Operations on atomic types [depr.atomics.types.operations]
#define ATOMIC_VAR_INIT(value) see_below
// The macro expands to a token sequence suitable for constant initialization of an atomic variable of static storage duration of a type that is initialization-compatible with value.
// [Note 1: This operation possibly needs to initialize locks.
#define ATOMIC_FLAG_INIT see_below
// Remarks: The macro ATOMIC_FLAG_INIT is defined in such a way that it can be used to initialize an object of type atomic_flag to the clear state. The macro can be used in the form:
            atomic_flag guard = ATOMIC_FLAG_INIT;
// It is unspecified whether the macro can be used in other initialization contexts. For a complete static-duration object, that initialization shall be static.
            int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
    }
```

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

```ubuntu:bash
$ clang++ p1806.cpp -std=03 -o p1806l -I. -Wall
In file included from p1806.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 \
 ^
p1806.cpp:24:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto cmp = e <=> f;
^
p1806.cpp:24:14: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
auto cmp = e <=> f;
             ^
                
p1806.cpp:24:16: error: expected expression
auto cmp = e <=> f;
               ^
p1806.cpp:32:7: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
      auto f = [=]() { x = n; };
      ^
p1806.cpp:32:16: error: expected expression
      auto f = [=]() { x = n; };
               ^
p1806.cpp:33:7: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
      auto g = [=, this]() { x = n; };
      ^
p1806.cpp:33:16: error: expected expression
      auto g = [=, this]() { x = n; };
               ^
p1806.cpp:41:18: warning: array comparison always evaluates to false [-Wtautological-compare]
bool same = arr1 == arr2;
                 ^
p1806.cpp:42:1: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto cmp = arr1 <=> arr2;
^
p1806.cpp:42:6: error: redefinition of 'cmp'
auto cmp = arr1 <=> arr2;
     ^
p1806.cpp:24:6: note: previous definition is here
auto cmp = e <=> f;
     ^
p1806.cpp:42:17: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
auto cmp = arr1 <=> arr2;
                ^
                   
p1806.cpp:42:19: error: expected expression
auto cmp = arr1 <=> arr2;
                  ^
p1806.cpp:49:1: error: expected unqualified-id
++velociraptor; // deprecated
^
p1806.cpp:54:3: error: C++ requires a type specifier for all declarations
  brachiosaur = neck;
  ^
p1806.cpp:55:3: error: C++ requires a type specifier for all declarations
  tail = brachiosaur;
  ^
p1806.cpp:56:3: error: C++ requires a type specifier for all declarations
  tail = brachiosaur = neck;
  ^
p1806.cpp:57:3: error: unknown type name 'brachiosaur'
  brachiosaur += neck;
  ^
p1806.cpp:57:15: error: expected unqualified-id
  brachiosaur += neck;
              ^
p1806.cpp:58:3: error: C++ requires a type specifier for all declarations
  brachiosaur = brachiosaur + neck;
  ^
p1806.cpp:71:17: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
       volatile auto [what_is_this] = alvarezsauroid;
                ^
p1806.cpp:71:22: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
       volatile auto [what_is_this] = alvarezsauroid;
                     ^~~~~~~~~~~~~~
p1806.cpp:71:22: warning: unused variable '[what_is_this]' [-Wunused-variable]
p1806.cpp:80:12: error: unknown type name 'constexpr'
    static constexpr int n = 5;
           ^
p1806.cpp:82:3: error: unknown type name 'constexpr'
  constexpr int A::n;
  ^
p1806.cpp:92:3: error: reference to 'A' is ambiguous
  A h();
  ^
p1806.cpp:79:10: note: candidate found by name lookup is 'A'
  struct A {
         ^
p1806.cpp:89:12: note: candidate found by name lookup is '(anonymous namespace)::A'
    struct A {
           ^
p1806.cpp:93:20: error: reference to 'A' is ambiguous
  inline void g() {A().f();
                   ^
p1806.cpp:79:10: note: candidate found by name lookup is 'A'
  struct A {
         ^
p1806.cpp:89:12: note: candidate found by name lookup is '(anonymous namespace)::A'
    struct A {
           ^
p1806.cpp:106:19: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
     namespace std::rel_ops {
                  ^~~~~~~~~
                   { namespace rel_ops
p1806.cpp:154:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  int_type overflow (int_type c = EOF) override;
                                       ^
p1806.cpp:155:40: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  int_type pbackfail(int_type c = EOF) override;
                                       ^
p1806.cpp:156:24: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  int_type underflow() override;
                       ^
p1806.cpp:158:77: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
                   ios_base::openmode which = ios_base::in | ios_base::out) override;
                                                                            ^
p1806.cpp:160:77: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
                   ios_base::openmode which = ios_base::in | ios_base::out) override;
                                                                            ^
p1806.cpp:161:44: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
  streambuf* setbuf(char* s, streamsize n) override;
                                           ^
p1806.cpp:163:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using strstate = T1;
                     ^
p1806.cpp:163:22: error: unknown type name 'T1'
p1806.cpp:164:18: error: unknown type name 'strstate'
    static const strstate allocated;
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
18 warnings and 20 errors generated.
$ clang++ p1806.cpp -std=2b -o p1806l -I. -Wall
p1806.cpp:22:12: warning: comparison of enumeration type 'E1' with floating-point type 'double' is deprecated [-Wdeprecated-enum-float-conversion]
bool b = e <= 3.7;
         ~ ^  ~~~
p1806.cpp:23:11: warning: arithmetic between different enumeration types ('E2' and 'E1') is deprecated [-Wdeprecated-enum-enum-conversion]
int k = f - e;
        ~ ^ ~
p1806.cpp:24:14: error: invalid operands to binary expression ('E1' and 'E2')
auto cmp = e <=> f;
           ~ ^   ~
p1806.cpp:33:12: warning: unused variable 'g' [-Wunused-variable]
      auto g = [=, this]() { x = n; };
           ^
p1806.cpp:32:12: warning: unused variable 'f' [-Wunused-variable]
      auto f = [=]() { x = n; };
           ^
p1806.cpp:41:18: warning: comparison between two arrays is deprecated; to compare array addresses, use unary '+' to decay operands to pointers [-Wdeprecated-array-compare]
bool same = arr1 == arr2;
            ~~~~ ^  ~~~~
p1806.cpp:41:18: warning: array comparison always evaluates to false [-Wtautological-compare]
p1806.cpp:42:6: error: redefinition of 'cmp'
auto cmp = arr1 <=> arr2;
     ^
p1806.cpp:24:6: note: previous definition is here
auto cmp = e <=> f;
     ^
p1806.cpp:42:17: error: invalid operands to binary expression ('int[5]' and 'int[5]')
auto cmp = arr1 <=> arr2;
           ~~~~ ^   ~~~~
p1806.cpp:49:1: error: expected unqualified-id
++velociraptor; // deprecated
^
p1806.cpp:54:3: error: C++ requires a type specifier for all declarations
  brachiosaur = neck;
  ^
p1806.cpp:55:3: error: C++ requires a type specifier for all declarations
  tail = brachiosaur;
  ^
p1806.cpp:56:3: error: C++ requires a type specifier for all declarations
  tail = brachiosaur = neck;
  ^
p1806.cpp:57:3: error: unknown type name 'brachiosaur'
  brachiosaur += neck;
  ^
p1806.cpp:57:15: error: expected unqualified-id
  brachiosaur += neck;
              ^
p1806.cpp:58:3: error: C++ requires a type specifier for all declarations
  brachiosaur = brachiosaur + neck;
  ^
p1806.cpp:65:31: warning: volatile-qualified parameter type 'volatile short' is deprecated [-Wdeprecated-volatile]
     void trex(volatile short left_arm, volatile short right_arm);
                              ^
p1806.cpp:65:56: warning: volatile-qualified parameter type 'volatile short' is deprecated [-Wdeprecated-volatile]
     void trex(volatile short left_arm, volatile short right_arm);
                                                       ^
p1806.cpp:71:8: warning: volatile qualifier in structured binding declaration is deprecated [-Wdeprecated-volatile]
       volatile auto [what_is_this] = alvarezsauroid;
       ^
p1806.cpp:71:22: warning: unused variable '[what_is_this]' [-Wunused-variable]
       volatile auto [what_is_this] = alvarezsauroid;
                     ^
p1806.cpp:92:3: error: reference to 'A' is ambiguous
  A h();
  ^
p1806.cpp:79:10: note: candidate found by name lookup is 'A'
  struct A {
         ^
p1806.cpp:89:12: note: candidate found by name lookup is '(anonymous namespace)::A'
    struct A {
           ^
p1806.cpp:93:20: error: reference to 'A' is ambiguous
  inline void g() {A().f();
                   ^
p1806.cpp:79:10: note: candidate found by name lookup is 'A'
  struct A {
         ^
p1806.cpp:89:12: note: candidate found by name lookup is '(anonymous namespace)::A'
    struct A {
           ^
p1806.cpp:163:22: error: unknown type name 'T1'
    using strstate = T1;
                     ^
p1806.cpp:164:18: error: unknown type name 'strstate'
    static const strstate allocated;
                 ^
p1806.cpp:165:18: error: unknown type name 'strstate'
    static const strstate constant;
                 ^
p1806.cpp:166:18: error: unknown type name 'strstate'
    static const strstate dynamic;
                 ^
p1806.cpp:167:18: error: unknown type name 'strstate'
    static const strstate frozen;
                 ^
p1806.cpp:168:5: error: unknown type name 'strstate'
    strstate strmode;
    ^
p1806.cpp:182:44: error: extraneous ')' before ';'
          unsigned char* pbeg_arg = nullptr);
                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
10 warnings and 20 errors generated.

$ g++ p1806.cpp -std=03 -o p1806g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1806.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 \
      |  ^~~~~
p1806.cpp:80:12: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
   80 |     static constexpr int n = 5;
      |            ^~~~~~~~~
p1806.cpp:141:64: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++11-compat]
  141 |   strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
      |                                                                ^~~~~~~
p1806.cpp:216:1: error: extended character — is not valid in an identifier
  216 | — If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
      | ^
p1806.cpp:216:61: error: extended character — is not valid in an identifier
  216 | — If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
      |                                                             ^
p1806.cpp:675:37: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
  675 |            size_t converted() const noexcept;
      |                                     ^~~~~~~~
p1806.cpp:24:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   24 | auto cmp = e <=> f;
      | ^~~~
      | ----
p1806.cpp:24:6: error: 'cmp' does not name a type
   24 | auto cmp = e <=> f;
      |      ^~~
p1806.cpp: In member function 'void X::foo(int)':
p1806.cpp:32:7: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   32 |       auto f = [=]() { x = n; };
      |       ^~~~
      |       ----
p1806.cpp:32:12: error: 'f' does not name a type
   32 |       auto f = [=]() { x = n; };
      |            ^
p1806.cpp:33:7: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   33 |       auto g = [=, this]() { x = n; };
      |       ^~~~
      |       ----
p1806.cpp:33:12: error: 'g' does not name a type
   33 |       auto g = [=, this]() { x = n; };
      |            ^
p1806.cpp: At global scope:
p1806.cpp:41:18: warning: comparison between two arrays [-Warray-compare]
   41 | bool same = arr1 == arr2;
      |             ~~~~~^~~~~~~
p1806.cpp:41:18: note: use unary '+' which decays operands to pointers or '&arr1[0] == &arr2[0]' to compare the addresses
p1806.cpp:42:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   42 | auto cmp = arr1 <=> arr2;
      | ^~~~
      | ----
p1806.cpp:42:6: error: 'cmp' does not name a type
   42 | auto cmp = arr1 <=> arr2;
      |      ^~~
p1806.cpp:49:1: error: expected unqualified-id before '++' token
   49 | ++velociraptor; // deprecated
      | ^~
p1806.cpp:54:3: error: 'brachiosaur' does not name a type
   54 |   brachiosaur = neck;
      |   ^~~~~~~~~~~
p1806.cpp:55:3: error: 'tail' does not name a type
   55 |   tail = brachiosaur;
      |   ^~~~
p1806.cpp:56:3: error: 'tail' does not name a type
   56 |   tail = brachiosaur = neck;
      |   ^~~~
p1806.cpp:57:3: error: 'brachiosaur' does not name a type
   57 |   brachiosaur += neck;
      |   ^~~~~~~~~~~
p1806.cpp:58:3: error: 'brachiosaur' does not name a type
   58 |   brachiosaur = brachiosaur + neck;
      |   ^~~~~~~~~~~
p1806.cpp: In function 'void park(linhenykus)':
p1806.cpp:71:17: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
   71 |        volatile auto [what_is_this] = alvarezsauroid;
      |                 ^~~~
      |                 ----
p1806.cpp:71:22: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
   71 |        volatile auto [what_is_this] = alvarezsauroid;
      |                      ^
p1806.cpp:71:22: error: ISO C++ forbids declaration of 'structured binding' with no type [-fpermissive]
   71 |        volatile auto [what_is_this] = alvarezsauroid;
      |                      ^~~~~~~~~~~~~~
p1806.cpp:71:22: error: structured binding declaration cannot be C++98 'auto'
p1806.cpp:71:22: error: structured binding declaration cannot have type 'volatile int'
p1806.cpp:71:22: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
p1806.cpp: At global scope:
p1806.cpp:80:12: error: 'constexpr' does not name a type
   80 |     static constexpr int n = 5;
      |            ^~~~~~~~~
p1806.cpp:80:12: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1806.cpp:82:3: error: 'constexpr' does not name a type
   82 |   constexpr int A::n;
      |   ^~~~~~~~~
p1806.cpp:82:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1806.cpp:92:3: error: reference to 'A' is ambiguous
   92 |   A h();
      |   ^
p1806.cpp:89:12: note: candidates are: 'struct {anonymous}::A'
   89 |     struct A {
      |            ^
p1806.cpp:79:10: note:                 'struct A'
   79 |   struct A {
      |          ^
p1806.cpp: In function 'void g()':
p1806.cpp:93:20: error: reference to 'A' is ambiguous
   93 |   inline void g() {A().f();
      |                    ^
p1806.cpp:89:12: note: candidates are: 'struct {anonymous}::A'
   89 |     struct A {
      |            ^
p1806.cpp:79:10: note:                 'struct A'
   79 |   struct A {
      |          ^
p1806.cpp: At global scope:
p1806.cpp:154:38: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  154 |   int_type overflow (int_type c = EOF) override;
      |                                      ^
p1806.cpp:155:38: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  155 |   int_type pbackfail(int_type c = EOF) override;
      |                                      ^
p1806.cpp:156:22: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  156 |   int_type underflow() override;
      |                      ^
p1806.cpp:158:75: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  158 |                    ios_base::openmode which = ios_base::in | ios_base::out) override;
      |                                                                           ^
p1806.cpp:160:75: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  160 |                    ios_base::openmode which = ios_base::in | ios_base::out) override;
      |                                                                           ^
p1806.cpp:161:42: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  161 |   streambuf* setbuf(char* s, streamsize n) override;
      |                                          ^
p1806.cpp:163:11: error: expected nested-name-specifier before 'strstate'
  163 |     using strstate = T1;
      |           ^~~~~~~~
p1806.cpp:164:18: error: 'strstate' does not name a type
  164 |     static const strstate allocated;
      |                  ^~~~~~~~
p1806.cpp:165:18: error: 'strstate' does not name a type
  165 |     static const strstate constant;
      |                  ^~~~~~~~
p1806.cpp:166:18: error: 'strstate' does not name a type
  166 |     static const strstate dynamic;
      |                  ^~~~~~~~
p1806.cpp:167:18: error: 'strstate' does not name a type
  167 |     static const strstate frozen;
      |                  ^~~~~~~~
p1806.cpp:168:5: error: 'strstate' does not name a type
  168 |     strstate strmode;
      |     ^~~~~~~~
p1806.cpp:141:64: error: 'nullptr' was not declared in this scope
  141 |   strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
      |                                                                ^~~~~~~
p1806.cpp:144:40: error: 'nullptr' was not declared in this scope
  144 |                signed char* pbeg_arg = nullptr);
      |                                        ^~~~~~~
p1806.cpp:147:42: error: 'nullptr' was not declared in this scope
  147 |                unsigned char* pbeg_arg = nullptr);
      |                                          ^~~~~~~
p1806.cpp: In constructor 'std::strstreambuf::strstreambuf()':
p1806.cpp:138:34: warning: delegating constructors only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  138 |   strstreambuf() : strstreambuf(0) {}
      |                                  ^
p1806.cpp: At global scope:
p1806.cpp:182:37: error: 'nullptr' was not declared in this scope
  182 |           unsigned char* pbeg_arg = nullptr);
      |                                     ^~~~~~~
p1806.cpp:190:16: error: conflicting declaration 'signed char* pbeg_arg'
  190 |   signed char* pbeg_arg = nullptr);
      |                ^~~~~~~~
p1806.cpp:182:26: note: previous declaration as 'unsigned char* pbeg_arg'
  182 |           unsigned char* pbeg_arg = nullptr);
      |                          ^~~~~~~~
p1806.cpp:190:27: error: 'nullptr' was not declared in this scope
  190 |   signed char* pbeg_arg = nullptr);
      |                           ^~~~~~~
p1806.cpp:192:19: error: expected unqualified-id before 'void'
  192 |      strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
      |                   ^~~~
p1806.cpp:192:19: error: expected ')' before 'void'
  192 |      strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
      |                  ~^~~~
      |                   )
p1806.cpp:194:19: error: expected unqualified-id before 'char'
  194 |      strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
      |                   ^~~~
p1806.cpp:194:19: error: expected ')' before 'char'
  194 |      strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
      |                  ~^~~~
      |                   )
p1806.cpp:195:14: error: expected unqualified-id before 'signed'
  195 | strstreambuf(signed char* gnext_arg, streamsize n,
      |              ^~~~~~
p1806.cpp:195:14: error: expected ')' before 'signed'
  195 | strstreambuf(signed char* gnext_arg, streamsize n,
      |             ~^~~~~~
      |              )
p1806.cpp:197:14: error: expected unqualified-id before 'unsigned'
  197 | strstreambuf(unsigned char* gnext_arg, streamsize n,  signed char* pbeg_arg = nullptr);
      |              ^~~~~~~~
p1806.cpp:197:14: error: expected ')' before 'unsigned'
  197 | strstreambuf(unsigned char* gnext_arg, streamsize n,  signed char* pbeg_arg = nullptr);
      |             ~^~~~~~~~
      |              )
p1806.cpp:203:7: error: expected constructor, destructor, or type conversion before '(' token
  203 |   setg(gnext_arg, gnext_arg, gnext_arg + N);
      |       ^
p1806.cpp:205:7: error: expected constructor, destructor, or type conversion before '(' token
  205 |   setg(gnext_arg, gnext_arg, pbeg_arg);
      |       ^
p1806.cpp:206:7: error: expected constructor, destructor, or type conversion before '(' token
  206 |   setp(pbeg_arg,  pbeg_arg + N);
      |       ^
p1806.cpp:207:14: error: expected unqualified-id before 'const'
  207 | strstreambuf(const char* gnext_arg, streamsize n);
      |              ^~~~~
p1806.cpp:207:14: error: expected ')' before 'const'
  207 | strstreambuf(const char* gnext_arg, streamsize n);
      |             ~^~~~~
      |              )
p1806.cpp:208:14: error: expected unqualified-id before 'const'
  208 | strstreambuf(const signed char* gnext_arg, streamsize n);
      |              ^~~~~
p1806.cpp:208:14: error: expected ')' before 'const'
  208 | strstreambuf(const signed char* gnext_arg, streamsize n);
      |             ~^~~~~
      |              )
p1806.cpp:209:14: error: expected unqualified-id before 'const'
  209 | strstreambuf(const unsigned char* gnext_arg, streamsize n);
      |              ^~~~~
p1806.cpp:209:14: error: expected ')' before 'const'
  209 | strstreambuf(const unsigned char* gnext_arg, streamsize n);
      |             ~^~~~~
      |              )
p1806.cpp:211:9: error: declaration of '~ std::strstreambuf' as non-member
  211 | virtual ~strstreambuf();
      |         ^~~~~~~~~~~~~
p1806.cpp:216:1: error: '\U00002014' does not name a type
  216 | — If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
      | ^
p1806.cpp:219:14: error: non-member function 'int pcount()' cannot have cv-qualifier
  219 | int pcount() const;
      |              ^~~~~
p1806.cpp:222:1: error: 'int_type' does not name a type
  222 | int_type overflow(int_type c = EOF) override;
      | ^~~~~~~~
p1806.cpp:236:1: error: 'int_type' does not name a type
  236 | int_type pbackfail(int_type c = EOF) override;
      | ^~~~~~~~
p1806.cpp:245:1: error: 'int_type' does not name a type
  245 | int_type underflow() override;
      | ^~~~~~~~
p1806.cpp:252:1: error: 'pos_type' does not name a type
  252 | pos_type seekoff(off_type off, seekdir way, openmode which = in | out) override;
      | ^~~~~~~~
p1806.cpp:269:1: error: 'pos_type' does not name a type
  269 | pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out) override;
      | ^~~~~~~~
p1806.cpp:278:1: error: 'std::streambuf' {aka 'std::basic_streambuf<char>'} is not a template
  278 | streambuf<char>* setbuf(char* s, streamsize n) override;
      | ^~~~~~~~~
p1806.cpp:278:46: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  278 | streambuf<char>* setbuf(char* s, streamsize n) override;
      |                                              ^
p1806.cpp:278:48: error: virt-specifiers in 'setbuf' not allowed outside a class definition
  278 | streambuf<char>* setbuf(char* s, streamsize n) override;
      |                                                ^~~~~~~~
p1806.cpp:295:21: error: expected unqualified-id before 'const'
  295 | explicit istrstream(const char* s);
      |                     ^~~~~
p1806.cpp:295:21: error: expected ')' before 'const'
  295 | explicit istrstream(const char* s);
      |                    ~^~~~~
      |                     )
p1806.cpp:296:21: error: expected unqualified-id before 'char'
  296 | explicit istrstream(char* s);
      |                     ^~~~
p1806.cpp:296:21: error: expected ')' before 'char'
  296 | explicit istrstream(char* s);
      |                    ~^~~~
      |                     )
p1806.cpp:300:12: error: expected unqualified-id before 'const'
  300 | istrstream(const char* s, streamsize n);
      |            ^~~~~
p1806.cpp:300:12: error: expected ')' before 'const'
  300 | istrstream(const char* s, streamsize n);
      |           ~^~~~~
      |            )
p1806.cpp:301:12: error: expected unqualified-id before 'char'
  301 | istrstream(char* s, streamsize n);
      |            ^~~~
p1806.cpp:301:12: error: expected ')' before 'char'
  301 | istrstream(char* s, streamsize n);
      |           ~^~~~
      |            )
p1806.cpp:304:23: error: non-member function 'std::strstreambuf* rdbuf()' cannot have cv-qualifier
  304 | strstreambuf* rdbuf() const;
      |                       ^~~~~
p1806.cpp:326:12: error: expected unqualified-id before ')' token
  326 | ostrstream();
      |            ^
p1806.cpp:328:12: error: expected unqualified-id before 'char'
  328 | ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
      |            ^~~~
p1806.cpp:328:12: error: expected ')' before 'char'
  328 | ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
      |           ~^~~~
      |            )
p1806.cpp:342:13: error: expected nested-name-specifier before 'char_type'
  342 |       using char_type = char;
      |             ^~~~~~~~~
p1806.cpp:343:13: error: expected nested-name-specifier before 'int_type'
  343 |       using int_type  = char_traits<char>::int_type;
      |             ^~~~~~~~
p1806.cpp:344:13: error: expected nested-name-specifier before 'pos_type'
  344 |       using pos_type  = char_traits<char>::pos_type;
      |             ^~~~~~~~
p1806.cpp:345:13: error: expected nested-name-specifier before 'off_type'
  345 |       using off_type  = char_traits<char>::off_type;
      |             ^~~~~~~~
p1806.cpp:359:23: error: non-member function 'std::strstreambuf* rdbuf()' cannot have cv-qualifier
  359 | strstreambuf* rdbuf() const;
      |                       ^~~~~
p1806.cpp:366:11: error: expected unqualified-id before ')' token
  366 | strstream();
      |           ^
p1806.cpp:368:58: error: expected ',' or ';' before ')' token
  368 |      ios_base::openmode mode = ios_base::in|ios_base::out);
      |                                                          ^
p1806.cpp:371:1: error: expected unqualified-id before '+' token
  371 | + std::strlen(s)).
      | ^
p1806.cpp:377:32: error: redefinition of 'class std::allocator< <template-parameter-1-1> >'
  377 |        template<class T> class allocator {
      |                                ^~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/string:41,
                 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:
/usr/local/include/c++/12.1.0/bits/allocator.h:124:11: note: previous definition of 'class std::allocator< <template-parameter-1-1> >'
  124 |     class allocator : public __allocator_base<_Tp>
      |           ^~~~~~~~~
p1806.cpp:385:23: error: non-member function 'std::strstreambuf* rdbuf()' cannot have cv-qualifier
  385 | strstreambuf* rdbuf() const;
      |                       ^~~~~
p1806.cpp:393:28: error: 'byte' does not name a type
  393 |        template<class Tp = byte>
      |                            ^~~~
p1806.cpp:405:26: error: 'constexpr' does not name a type
  405 | template<class T> inline constexpr bool is_pod_v = is_pod<T>::value; template<size_t Len, size_t Align = default-alignment > // see below
      |                          ^~~~~~~~~
p1806.cpp:405:26: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1806.cpp:405:106: error: expected primary-expression before 'default'
  405 | template<class T> inline constexpr bool is_pod_v = is_pod<T>::value; template<size_t Len, size_t Align = default-alignment > // see below
      |                                                                                                          ^~~~~~~
p1806.cpp:405:106: error: expected '>' before 'default'
p1806.cpp:407:37: error: expected primary-expression before 'default'
  407 | template<size_t Len, size_t Align = default-alignment > // see below
      |                                     ^~~~~~~
p1806.cpp:407:37: error: expected '>' before 'default'
p1806.cpp:408:10: error: expected unqualified-id before 'using'
  408 |          using aligned_storage_t = typename aligned_storage<Len, Align>::type;
      |          ^~~~~
p1806.cpp:409:34: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  409 |        template<size_t Len, class... Types>
      |                                  ^~~
p1806.cpp:411:34: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  411 |        template<size_t Len, class... Types>
      |                                  ^~~
p1806.cpp:412:10: error: expected unqualified-id before 'using'
  412 |          using aligned_union_t = typename aligned_union<Len, Types...>::type;
      |          ^~~~~
p1806.cpp:421:37: error: expected primary-expression before 'default'
  421 | template<size_t Len, size_t Align = default-alignment>
      |                                     ^~~~~~~
p1806.cpp:421:37: error: expected '>' before 'default'
p1806.cpp:425:1: error: expected unqualified-id before '[' token
  425 | [// Note 2: Uses of aligned_storage<Len, Align>::type can be replaced by an array std::byte[Len] declared with alignas(Align).
      | ^
p1806.cpp:432:27: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  432 | template<size_t Len, class... Types>
      |                           ^~~
p1806.cpp:438:32: error: 'tuple_size' is not a class template
  438 |        template<class T> class tuple_size<volatile T>;
      |                                ^~~~~~~~~~
p1806.cpp:440:42: error: 'tuple_element' is not a class template
  440 |        template<size_t I, class T> class tuple_element<I, volatile T>;
      |                                          ^~~~~~~~~~~~~
p1806.cpp:443:28: error: specialization of 'template<class T> class std::tuple_size' in different namespace [-fpermissive]
  443 |    template<class T> class tuple_size<volatile T>;
      |                            ^~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:438:32: note:   from definition of 'template<class T> class std::tuple_size'
  438 |        template<class T> class tuple_size<volatile T>;
      |                                ^~~~~~~~~~
p1806.cpp:450:35: error: 'variant_size' is not a class template
  450 |          template<class T> struct variant_size<volatile T>;
      |                                   ^~~~~~~~~~~~
p1806.cpp:452:45: error: 'variant_alternative' is not a class template
  452 |          template<size_t I, class T> struct variant_alternative<I, volatile T>;
      |                                             ^~~~~~~~~~~~~~~~~~~
p1806.cpp:455:30: error: specialization of 'template<class T> struct std::variant_size' in different namespace [-fpermissive]
  455 |      template<class T> class variant_size<volatile T>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:450:35: note:   from definition of 'template<class T> struct std::variant_size'
  450 |          template<class T> struct variant_size<volatile T>;
      |                                   ^~~~~~~~~~~~
p1806.cpp:457:35: error: specialization of 'template<long unsigned int I, class T> class std::tuple_element' in different namespace [-fpermissive]
  457 | template<size_t I, class T> class tuple_element<I, volatile T>;
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:440:42: note:   from definition of 'template<long unsigned int I, class T> class std::tuple_element'
  440 |        template<size_t I, class T> class tuple_element<I, volatile T>;
      |                                          ^~~~~~~~~~~~~
p1806.cpp:464:35: error: specialization of 'template<long unsigned int I, class T> struct std::variant_alternative' in different namespace [-fpermissive]
  464 | template<size_t I, class T> class variant_alternative<I, volatile T>;
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:452:45: note:   from definition of 'template<long unsigned int I, class T> struct std::variant_alternative'
  452 |          template<size_t I, class T> struct variant_alternative<I, volatile T>;
      |                                             ^~~~~~~~~~~~~~~~~~~
p1806.cpp:466:1: error: expected declaration before '}' token
  466 | }; }
      | ^
p1806.cpp:466:4: error: expected declaration before '}' token
  466 | }; }
      |    ^
p1806.cpp:471:42: error: redefinition of default argument for 'class Distance'
  471 |        template<class Category, class T, class Distance = ptrdiff_t,
      |                                          ^~~~~
In file included from /usr/local/include/c++/12.1.0/string:45:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:125:46: note: original definition appeared here
  125 |   template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
      |                                              ^~~~~~~~
p1806.cpp:493:7: error: 'constexpr' does not name a type
  493 |       constexpr pointer operator->() const;
      |       ^~~~~~~~~
p1806.cpp:493:7: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1806.cpp:496:1: error: 'constexpr' does not name a type
  496 | constexpr pointer operator->() const;
      | ^~~~~~~~~
p1806.cpp:496:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1806.cpp:501:41: error: 'shared_ptr' does not name a type
  501 |          bool atomic_is_lock_free(const shared_ptr<T>* p);
      |                                         ^~~~~~~~~~
p1806.cpp:501:51: error: expected ',' or '...' before '<' token
  501 |          bool atomic_is_lock_free(const shared_ptr<T>* p);
      |                                                   ^
p1806.cpp:503:10: error: 'shared_ptr' does not name a type
  503 |          shared_ptr<T> atomic_load(const shared_ptr<T>* p);
      |          ^~~~~~~~~~
p1806.cpp:505:10: error: 'shared_ptr' does not name a type
  505 |          shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
      |          ^~~~~~~~~~
p1806.cpp:507:15: error: variable or field 'atomic_store' declared void
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |               ^~~~~~~~~~~~
p1806.cpp:507:28: error: 'shared_ptr' was not declared in this scope
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                            ^~~~~~~~~~
p1806.cpp:507:28: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:507:40: error: expected primary-expression before '>' token
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                        ^
p1806.cpp:507:43: error: 'p' was not declared in this scope
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                           ^
p1806.cpp:507:46: error: 'shared_ptr' was not declared in this scope
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                              ^~~~~~~~~~
p1806.cpp:507:46: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:507:58: error: expected primary-expression before '>' token
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                          ^
p1806.cpp:507:60: error: 'r' was not declared in this scope
  507 |          void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                            ^
p1806.cpp:509:15: error: variable or field 'atomic_store_explicit' declared void
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |               ^~~~~~~~~~~~~~~~~~~~~
p1806.cpp:509:37: error: 'shared_ptr' was not declared in this scope
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                     ^~~~~~~~~~
p1806.cpp:509:37: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:509:49: error: expected primary-expression before '>' token
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                 ^
p1806.cpp:509:52: error: 'p' was not declared in this scope
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                    ^
p1806.cpp:509:55: error: 'shared_ptr' was not declared in this scope
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                       ^~~~~~~~~~
p1806.cpp:509:55: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:509:67: error: expected primary-expression before '>' token
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                   ^
p1806.cpp:509:69: error: 'r' was not declared in this scope
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                     ^
p1806.cpp:509:72: error: 'memory_order' was not declared in this scope
  509 |          void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                        ^~~~~~~~~~~~
p1806.cpp:511:10: error: 'shared_ptr' does not name a type
  511 |          shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
      |          ^~~~~~~~~~
p1806.cpp:513:10: error: 'shared_ptr' does not name a type
  513 |          shared_ptr<T> atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |          ^~~~~~~~~~
p1806.cpp:515:44: error: 'shared_ptr' was not declared in this scope
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                            ^~~~~~~~~~
p1806.cpp:515:44: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:515:56: error: expected primary-expression before '>' token
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                        ^
p1806.cpp:515:59: error: 'p' was not declared in this scope
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                           ^
p1806.cpp:515:62: error: 'shared_ptr' was not declared in this scope
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                              ^~~~~~~~~~
p1806.cpp:515:62: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:515:74: error: expected primary-expression before '>' token
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                          ^
p1806.cpp:515:77: error: 'v' was not declared in this scope
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                             ^
p1806.cpp:515:80: error: 'shared_ptr' was not declared in this scope
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                ^~~~~~~~~~
p1806.cpp:515:80: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:515:92: error: expected primary-expression before '>' token
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                            ^
p1806.cpp:515:94: error: 'w' was not declared in this scope
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                              ^
p1806.cpp:515:95: error: expression list treated as compound expression in initializer [-fpermissive]
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                               ^
p1806.cpp:515:15: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  515 |          bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:517:46: error: 'shared_ptr' was not declared in this scope
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                              ^~~~~~~~~~
p1806.cpp:517:46: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:517:58: error: expected primary-expression before '>' token
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                          ^
p1806.cpp:517:61: error: 'p' was not declared in this scope
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                             ^
p1806.cpp:517:64: error: 'shared_ptr' was not declared in this scope
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                ^~~~~~~~~~
p1806.cpp:517:64: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:517:76: error: expected primary-expression before '>' token
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                            ^
p1806.cpp:517:79: error: 'v' was not declared in this scope
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                               ^
p1806.cpp:517:82: error: 'shared_ptr' was not declared in this scope
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                  ^~~~~~~~~~
p1806.cpp:517:82: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:517:94: error: expected primary-expression before '>' token
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                              ^
p1806.cpp:517:96: error: 'w' was not declared in this scope
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                                ^
p1806.cpp:517:97: error: expression list treated as compound expression in initializer [-fpermissive]
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                                 ^
p1806.cpp:517:15: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  517 |          bool atomic_compare_exchange_strong(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:520:12: error: 'shared_ptr' was not declared in this scope
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |            ^~~~~~~~~~
p1806.cpp:520:12: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:520:24: error: expected primary-expression before '>' token
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                        ^
p1806.cpp:520:27: error: 'p' was not declared in this scope
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                           ^
p1806.cpp:520:30: error: 'shared_ptr' was not declared in this scope
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                              ^~~~~~~~~~
p1806.cpp:520:30: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:520:42: error: expected primary-expression before '>' token
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                          ^
p1806.cpp:520:45: error: 'v' was not declared in this scope
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                             ^
p1806.cpp:520:48: error: 'shared_ptr' was not declared in this scope
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                ^~~~~~~~~~
p1806.cpp:520:48: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:520:60: error: expected primary-expression before '>' token
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                            ^
p1806.cpp:520:62: error: 'w' was not declared in this scope
  520 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                              ^
p1806.cpp:521:12: error: 'memory_order' was not declared in this scope
  521 |            memory_order success, memory_order failure);
      |            ^~~~~~~~~~~~
p1806.cpp:521:34: error: 'memory_order' was not declared in this scope
  521 |            memory_order success, memory_order failure);
      |                                  ^~~~~~~~~~~~
p1806.cpp:521:54: error: expression list treated as compound expression in initializer [-fpermissive]
  521 |            memory_order success, memory_order failure);
      |                                                      ^
p1806.cpp:519:15: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  519 |          bool atomic_compare_exchange_weak_explicit(
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:524:12: error: 'shared_ptr' was not declared in this scope
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |            ^~~~~~~~~~
p1806.cpp:524:12: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:524:24: error: expected primary-expression before '>' token
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                        ^
p1806.cpp:524:27: error: 'p' was not declared in this scope
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                           ^
p1806.cpp:524:30: error: 'shared_ptr' was not declared in this scope
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                              ^~~~~~~~~~
p1806.cpp:524:30: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:524:42: error: expected primary-expression before '>' token
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                          ^
p1806.cpp:524:45: error: 'v' was not declared in this scope
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                             ^
p1806.cpp:524:48: error: 'shared_ptr' was not declared in this scope
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                ^~~~~~~~~~
p1806.cpp:524:48: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:524:60: error: expected primary-expression before '>' token
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                            ^
p1806.cpp:524:62: error: 'w' was not declared in this scope
  524 |            shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                              ^
p1806.cpp:525:12: error: 'memory_order' was not declared in this scope
  525 |            memory_order success, memory_order failure);
      |            ^~~~~~~~~~~~
p1806.cpp:525:34: error: 'memory_order' was not declared in this scope
  525 |            memory_order success, memory_order failure);
      |                                  ^~~~~~~~~~~~
p1806.cpp:525:54: error: expression list treated as compound expression in initializer [-fpermissive]
  525 |            memory_order success, memory_order failure);
      |                                                      ^
p1806.cpp:523:15: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  523 |          bool atomic_compare_exchange_strong_explicit(
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:529:53: error: 'shared_ptr' does not name a type
  529 |    template<class T> bool atomic_is_lock_free(const shared_ptr<T>* p);
      |                                                     ^~~~~~~~~~
p1806.cpp:529:63: error: expected ',' or '...' before '<' token
  529 |    template<class T> bool atomic_is_lock_free(const shared_ptr<T>* p);
      |                                                               ^
p1806.cpp:536:19: error: 'shared_ptr' does not name a type
  536 | template<class T> shared_ptr<T> atomic_load(const shared_ptr<T>* p);
      |                   ^~~~~~~~~~
p1806.cpp:537:19: error: 'shared_ptr' does not name a type
  537 | template<class T> shared_ptr<T> atomic_load_explicit(const shared_ptr<T>* p, memory_order mo);
      |                   ^~~~~~~~~~
p1806.cpp:541:24: error: variable or field 'atomic_store' declared void
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                        ^~~~~~~~~~~~
p1806.cpp:541:37: error: 'shared_ptr' was not declared in this scope
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                     ^~~~~~~~~~
p1806.cpp:541:37: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:541:49: error: expected primary-expression before '>' token
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                 ^
p1806.cpp:541:52: error: 'p' was not declared in this scope
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                    ^
p1806.cpp:541:55: error: 'shared_ptr' was not declared in this scope
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                       ^~~~~~~~~~
p1806.cpp:541:55: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:541:67: error: expected primary-expression before '>' token
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                                   ^
p1806.cpp:541:69: error: 'r' was not declared in this scope
  541 | template<class T> void atomic_store(shared_ptr<T>* p, shared_ptr<T> r);
      |                                                                     ^
p1806.cpp:544:24: error: variable or field 'atomic_store_explicit' declared void
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                        ^~~~~~~~~~~~~~~~~~~~~
p1806.cpp:544:46: error: 'shared_ptr' was not declared in this scope
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                              ^~~~~~~~~~
p1806.cpp:544:46: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:544:58: error: expected primary-expression before '>' token
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                          ^
p1806.cpp:544:61: error: 'p' was not declared in this scope
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                             ^
p1806.cpp:544:64: error: 'shared_ptr' was not declared in this scope
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                ^~~~~~~~~~
p1806.cpp:544:64: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:544:76: error: expected primary-expression before '>' token
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                            ^
p1806.cpp:544:78: error: 'r' was not declared in this scope
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                              ^
p1806.cpp:544:81: error: 'memory_order' was not declared in this scope
  544 | template<class T> void atomic_store_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |                                                                                 ^~~~~~~~~~~~
p1806.cpp:548:19: error: 'shared_ptr' does not name a type
  548 | template<class T> shared_ptr<T> atomic_exchange(shared_ptr<T>* p, shared_ptr<T> r);
      |                   ^~~~~~~~~~
p1806.cpp:552:3: error: 'shared_ptr' does not name a type
  552 |   shared_ptr<T> atomic_exchange_explicit(shared_ptr<T>* p, shared_ptr<T> r, memory_order mo);
      |   ^~~~~~~~~~
p1806.cpp:555:37: error: 'shared_ptr' was not declared in this scope
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                     ^~~~~~~~~~
p1806.cpp:555:37: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:555:49: error: expected primary-expression before '>' token
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                 ^
p1806.cpp:555:52: error: 'p' was not declared in this scope
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                    ^
p1806.cpp:555:55: error: 'shared_ptr' was not declared in this scope
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                       ^~~~~~~~~~
p1806.cpp:555:55: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:555:67: error: expected primary-expression before '>' token
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                   ^
p1806.cpp:555:70: error: 'v' was not declared in this scope
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                      ^
p1806.cpp:555:73: error: 'shared_ptr' was not declared in this scope
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                         ^~~~~~~~~~
p1806.cpp:555:73: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:555:85: error: expected primary-expression before '>' token
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                     ^
p1806.cpp:555:87: error: 'w' was not declared in this scope
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                       ^
p1806.cpp:555:88: error: expression list treated as compound expression in initializer [-fpermissive]
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |                                                                                        ^
p1806.cpp:555:8: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  555 |   bool atomic_compare_exchange_weak(shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:557:40: error: expected constructor, destructor, or type conversion before '(' token
  557 |   atomic_compare_exchange_weak_explicit(p, v, w, memory_order::seq_cst, memory_order::seq_cst)
      |                                        ^
p1806.cpp:563:1: error: 'shared_ptr' was not declared in this scope
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      | ^~~~~~~~~~
p1806.cpp:563:1: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:563:13: error: expected primary-expression before '>' token
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |             ^
p1806.cpp:563:16: error: 'p' was not declared in this scope
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                ^
p1806.cpp:563:19: error: 'shared_ptr' was not declared in this scope
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                   ^~~~~~~~~~
p1806.cpp:563:19: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:563:31: error: expected primary-expression before '>' token
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                               ^
p1806.cpp:563:34: error: 'v' was not declared in this scope
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                  ^
p1806.cpp:563:37: error: 'shared_ptr' was not declared in this scope
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                     ^~~~~~~~~~
p1806.cpp:563:37: note: 'std::shared_ptr' is only available from C++11 onwards
p1806.cpp:563:49: error: expected primary-expression before '>' token
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                 ^
p1806.cpp:563:51: error: 'w' was not declared in this scope
  563 | shared_ptr<T>* p, shared_ptr<T>* v, shared_ptr<T> w,
      |                                                   ^
p1806.cpp:564:1: error: 'memory_order' was not declared in this scope
  564 | memory_order success, memory_order failure);
      | ^~~~~~~~~~~~
p1806.cpp:564:23: error: 'memory_order' was not declared in this scope
  564 | memory_order success, memory_order failure);
      |                       ^~~~~~~~~~~~
p1806.cpp:564:43: error: expression list treated as compound expression in initializer [-fpermissive]
  564 | memory_order success, memory_order failure);
      |                                           ^
p1806.cpp:562:8: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  562 |   bool atomic_compare_exchange_weak_explicit(
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:565:1: error: 'memory_order' does not name a type
  565 | memory_order::seq_cst)
      | ^~~~~~~~~~~~
p1806.cpp:577:50: error: spurious '>>', use '>' to terminate a template argument list
  577 |                 class Allocator = allocator<charT>>
      |                                                  ^~
p1806.cpp:578:27: error: definition of 'class std::basic_string' inside template parameter list
  578 |        class basic_string {
      |                           ^
p1806.cpp:577:35: error: two or more data types in declaration of 'type name'
  577 |                 class Allocator = allocator<charT>>
      |                                   ^~~~~~~~~~~~~~~~~
p1806.cpp:581:2: error: expected '>' before ';' token
  581 | }; }
      |  ^
p1806.cpp:581:2: error: expected unqualified-id before ';' token
p1806.cpp:631:51: error: spurious '>>', use '>' to terminate a template argument list
  631 |                   class ByteAlloc = allocator<char>>
      |                                                   ^~
p1806.cpp:631:37: error: two or more data types in declaration of 'type name'
  631 |                   class ByteAlloc = allocator<char>>
      |                                     ^~~~~~~~~~~~~~~~
p1806.cpp:632:33: error: expected '>' before ';' token
  632 |            class wstring_convert;
      |                                 ^
p1806.cpp:632:33: error: expected unqualified-id before ';' token
p1806.cpp:634:46: error: spurious '>>', use '>' to terminate a template argument list
  634 |                   class Tr = char_traits<Elem>>
      |                                              ^~
p1806.cpp:634:30: error: two or more data types in declaration of 'type name'
  634 |                   class Tr = char_traits<Elem>>
      |                              ^~~~~~~~~~~~~~~~~~
p1806.cpp:635:33: error: expected '>' before ';' token
  635 |            class wbuffer_convert;
      |                                 ^
p1806.cpp:635:33: error: expected unqualified-id before ';' token
p1806.cpp:646:6: error: 'std::wstring_convert' is not a template
  646 |      wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
      |      ^~~~~~~~~~~~~~~
p1806.cpp:646:47: error: '>>' should be '> >' within a nested template argument list
  646 |      wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
      |                                               ^~
      |                                               > >
p1806.cpp:646:50: error: aggregate 'std::wstring_convert myconv' has incomplete type and cannot be defined
  646 |      wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
      |                                                  ^~~~~~
p1806.cpp:648:11: error: 'cout' in namespace 'std' does not name a type
  648 |      std::cout << mbstring;
      |           ^~~~
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1806.cpp:652:49: error: spurious '>>', use '>' to terminate a template argument list
  652 |                 class ByteAlloc = allocator<char>>
      |                                                 ^~
p1806.cpp:653:32: error: definition of 'class std::wstring_convert' inside template parameter list
  653 |          class wstring_convert {
      |                                ^
p1806.cpp:652:35: error: two or more data types in declaration of 'type name'
  652 |                 class ByteAlloc = allocator<char>>
      |                                   ^~~~~~~~~~~~~~~~
p1806.cpp:683:2: error: expected '>' before ';' token
  683 | }; }
      |  ^
p1806.cpp:683:2: error: expected unqualified-id before ';' token
p1806.cpp:693:1: error: 'wide_string' does not name a type
  693 | wide_string from_bytes(char byte);
      | ^~~~~~~~~~~
p1806.cpp:694:1: error: 'wide_string' does not name a type
  694 | wide_string from_bytes(const char* ptr);
      | ^~~~~~~~~~~
p1806.cpp:695:1: error: 'wide_string' does not name a type
  695 | wide_string from_bytes(const byte_string& str);
      | ^~~~~~~~~~~
p1806.cpp:696:1: error: 'wide_string' does not name a type
  696 | wide_string from_bytes(const char* first, const char* last);
      | ^~~~~~~~~~~
p1806.cpp:701:7: error: expected nested-name-specifier before 'int_type'
  701 | using int_type = typename wide_string::traits_type::int_type;
      |       ^~~~~~~~
p1806.cpp:704:7: error: expected nested-name-specifier before 'state_type'
  704 | using state_type = typename Codecvt::state_type;
      |       ^~~~~~~~~~
p1806.cpp:706:1: error: 'byte_string' does not name a type
  706 | byte_string to_bytes(Elem wchar);
      | ^~~~~~~~~~~
p1806.cpp:707:1: error: 'byte_string' does not name a type
  707 | byte_string to_bytes(const Elem* wptr);
      | ^~~~~~~~~~~
p1806.cpp:708:1: error: 'byte_string' does not name a type
  708 | byte_string to_bytes(const wide_string& wstr);
      | ^~~~~~~~~~~
p1806.cpp:709:1: error: 'byte_string' does not name a type
  709 | byte_string to_bytes(const Elem* first, const Elem* last);
      | ^~~~~~~~~~~
p1806.cpp:714:7: error: expected nested-name-specifier before 'wide_string'
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |       ^~~~~~~~~~~
p1806.cpp:719:33: error: expected ')' before '*' token
  719 | explicit wstring_convert(Codecvt* pcvt);
      |                         ~       ^
      |                                 )
p1806.cpp:720:24: error: expected ')' before '*' token
  720 | wstring_convert(Codecvt* pcvt, state_type state);
      |                ~       ^
      |                        )
p1806.cpp:721:26: error: expected unqualified-id before 'const'
  721 | explicit wstring_convert(const byte_string& byte_err,
      |                          ^~~~~
p1806.cpp:721:26: error: expected ')' before 'const'
  721 | explicit wstring_convert(const byte_string& byte_err,
      |                         ~^~~~~
      |                          )
p1806.cpp:727:81: error: spurious '>>', use '>' to terminate a template argument list
  727 |        template<class Codecvt, class Elem = wchar_t, class Tr = char_traits<Elem>>
      |                                                                                 ^~
p1806.cpp:728:63: error: 'Tr' was not declared in this scope
  728 |          class wbuffer_convert : public basic_streambuf<Elem, Tr> {
      |                                                               ^~
p1806.cpp:728:65: error: template argument 2 is invalid
  728 |          class wbuffer_convert : public basic_streambuf<Elem, Tr> {
      |                                                                 ^
p1806.cpp:728:67: error: definition of 'class std::wbuffer_convert' inside template parameter list
  728 |          class wbuffer_convert : public basic_streambuf<Elem, Tr> {
      |                                                                   ^
p1806.cpp:727:65: error: two or more data types in declaration of 'type name'
  727 |        template<class Codecvt, class Elem = wchar_t, class Tr = char_traits<Elem>>
      |                                                                 ^~~~~~~~~~~~~~~~~~
p1806.cpp:743:2: error: expected '>' before ';' token
  743 | }; }
      |  ^
p1806.cpp:743:2: error: expected unqualified-id before ';' token
p1806.cpp:744:3: error: 'state_type' does not name a type
  744 |   state_type state() const;
      |   ^~~~~~~~~~
p1806.cpp:745:1: error: expected unqualified-id before 'private'
  745 | private:
      | ^~~~~~~
p1806.cpp:747:3: error: 'Codecvt' does not name a type
  747 |   Codecvt* cvtptr;
      |   ^~~~~~~
p1806.cpp:748:3: error: 'state_type' does not name a type
  748 |   state_type cvtstate;
      |   ^~~~~~~~~~
p1806.cpp:752:1: error: 'state_type' does not name a type
  752 | state_type state() const;
      | ^~~~~~~~~~
p1806.cpp:759:23: error: 'filesystem' is not a namespace-name; did you mean 'system'?
  759 |   namespace fs = std::filesystem;
      |                       ^~~~~~~~~~
      |                       system
p1806.cpp:760:29: error: 'read_utf8_data' was not declared in this scope
  760 |   std::string utf8_string = read_utf8_data();
      |                             ^~~~~~~~~~~~~~
p1806.cpp:761:3: error: 'fs' does not name a type
  761 |   fs::create_directory(fs::u8path(utf8_string));
      |   ^~
p1806.cpp:762:20: error: non-member function 'std::streambuf* rdbuf()' cannot have cv-qualifier
  762 | streambuf* rdbuf() const;
      |                    ^~~~~
p1806.cpp:762:12: error: ambiguating new declaration of 'std::streambuf* rdbuf()'
  762 | streambuf* rdbuf() const;
      |            ^~~~~
p1806.cpp:385:15: note: old declaration 'std::strstreambuf* rdbuf()'
  385 | strstreambuf* rdbuf() const;
      |               ^~~~~
p1806.cpp:765:14: error: 'char32_t' was not declared in this scope
  765 |      codecvt<char32_t, char, mbstate_t>
      |              ^~~~~~~~
p1806.cpp:765:39: error: template argument 1 is invalid
  765 |      codecvt<char32_t, char, mbstate_t>
      |                                       ^
p1806.cpp:767:21: error: 'char32_t' was not declared in this scope
  767 |      codecvt_byname<char32_t, char, mbstate_t>
      |                     ^~~~~~~~
p1806.cpp:767:46: error: template argument 1 is invalid
  767 |      codecvt_byname<char32_t, char, mbstate_t>
      |                                              ^
p1806.cpp:771:7: error: expected nested-name-specifier before 'state_type'
  771 | using state_type = typename Codecvt::state_type;
      |       ^~~~~~~~~~
p1806.cpp:774:14: error: expected ')' before '*' token
  774 |     streambuf* bytebuf,
      |              ^
      |              )
p1806.cpp:773:25: note: to match this '('
  773 | explicit wbuffer_convert(
      |                         ^
p1806.cpp:779:1: error: 'cvtptr' does not name a type
  779 | cvtptr to pcvt, and initializes cvtstate to state. ~wbuffer_convert();
      | ^~~~~~
p1806.cpp:784:3: error: 'path' does not name a type
  784 |   path u8path(const Source& source);
      |   ^~~~
p1806.cpp:786:3: error: 'path' does not name a type
  786 |   path u8path(InputIterator first, InputIterator last);
      |   ^~~~
p1806.cpp:796:36: error: 'atomic' does not name a type
  796 |          void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                    ^~~~~~
p1806.cpp:796:42: error: expected ',' or '...' before '<' token
  796 |          void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                          ^
p1806.cpp:796:80: error: expected initializer before 'noexcept'
  796 |          void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                                                                ^~~~~~~~
p1806.cpp:798:15: error: variable or field 'atomic_init' declared void
  798 |          void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
      |               ^~~~~~~~~~~
p1806.cpp:798:27: error: 'atomic' was not declared in this scope
  798 |          void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                           ^~~~~~
p1806.cpp:798:27: note: 'std::atomic' is only available from C++11 onwards
p1806.cpp:798:35: error: expected primary-expression before '>' token
  798 |          void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                   ^
p1806.cpp:798:37: error: expected primary-expression before ',' token
  798 |          void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                     ^
p1806.cpp:798:48: error: expected nested-name-specifier before 'atomic'
  798 |          void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                                ^~~~~~
p1806.cpp:798:48: error: expected '(' before 'atomic'
  798 |          void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;
      |                                                ^~~~~~
      |                                                (
p1806.cpp:804:11: error: variable or field 'store' declared void
  804 |      void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |           ^~~~~
p1806.cpp:804:17: error: 'T' was not declared in this scope
  804 |      void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |                 ^
p1806.cpp:804:28: error: 'memory_order' was not declared in this scope
  804 |      void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |                            ^~~~~~~~~~~~
p1806.cpp:805:6: error: 'T' does not name a type
  805 |      T operator=(T desired) volatile noexcept;
      |      ^
p1806.cpp:806:6: error: 'T' does not name a type
  806 |      T load(memory_order order = memory_order::seq_cst) const volatile noexcept;
      |      ^
p1806.cpp:807:15: error: expected type-specifier before 'T'
  807 |      operator T() const volatile noexcept;
      |               ^
p1806.cpp:808:6: error: 'T' does not name a type
  808 |      T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |      ^
p1806.cpp:809:33: error: 'T' was not declared in this scope
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |                                 ^
p1806.cpp:809:36: error: 'expected' was not declared in this scope
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |                                    ^~~~~~~~
p1806.cpp:809:46: error: 'T' was not declared in this scope
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |                                              ^
p1806.cpp:810:33: error: 'memory_order' was not declared in this scope
  810 |                                 memory_order success, memory_order failure) volatile noexcept;
      |                                 ^~~~~~~~~~~~
p1806.cpp:810:55: error: 'memory_order' was not declared in this scope
  810 |                                 memory_order success, memory_order failure) volatile noexcept;
      |                                                       ^~~~~~~~~~~~
p1806.cpp:810:75: error: expression list treated as compound expression in initializer [-fpermissive]
  810 |                                 memory_order success, memory_order failure) volatile noexcept;
      |                                                                           ^
p1806.cpp:811:35: error: 'T' was not declared in this scope
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |                                   ^
p1806.cpp:811:38: error: 'expected' was not declared in this scope
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |                                      ^~~~~~~~
p1806.cpp:811:48: error: 'T' was not declared in this scope
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |                                                ^
p1806.cpp:812:35: error: 'memory_order' was not declared in this scope
  812 |                                   memory_order success, memory_order failure) volatile noexcept;
      |                                   ^~~~~~~~~~~~
p1806.cpp:812:57: error: 'memory_order' was not declared in this scope
  812 |                                   memory_order success, memory_order failure) volatile noexcept;
      |                                                         ^~~~~~~~~~~~
p1806.cpp:812:77: error: expression list treated as compound expression in initializer [-fpermissive]
  812 |                                   memory_order success, memory_order failure) volatile noexcept;
      |                                                                             ^
p1806.cpp:813:11: error: redefinition of 'bool compare_exchange_weak'
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~
p1806.cpp:809:11: note: 'bool compare_exchange_weak' previously defined here
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~
p1806.cpp:813:33: error: 'T' was not declared in this scope
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |                                 ^
p1806.cpp:813:36: error: 'expected' was not declared in this scope
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |                                    ^~~~~~~~
p1806.cpp:813:46: error: 'T' was not declared in this scope
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |                                              ^
p1806.cpp:814:33: error: 'memory_order' was not declared in this scope
  814 |                                 memory_order order = memory_order::seq_cst) volatile noexcept;
      |                                 ^~~~~~~~~~~~
p1806.cpp:815:11: error: redefinition of 'bool compare_exchange_strong'
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:811:11: note: 'bool compare_exchange_strong' previously defined here
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:815:35: error: 'T' was not declared in this scope
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |                                   ^
p1806.cpp:815:38: error: 'expected' was not declared in this scope
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |                                      ^~~~~~~~
p1806.cpp:815:48: error: 'T' was not declared in this scope
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |                                                ^
p1806.cpp:816:1: error: 'memory_order' was not declared in this scope
  816 | memory_order order = memory_order::seq_cst) volatile noexcept; T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
      | ^~~~~~~~~~~~
p1806.cpp:816:64: error: 'T' does not name a type
  816 | memory_order order = memory_order::seq_cst) volatile noexcept; T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
      |                                                                ^
p1806.cpp:817:1: error: 'T' does not name a type
  817 | T operator op=(T operand) volatile noexcept;
      | ^
p1806.cpp:818:1: error: 'T' does not name a type
  818 | T* fetch_key(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;
      | ^
p1806.cpp:821:32: error: 'atomic' does not name a type
  821 |      void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                                ^~~~~~
p1806.cpp:821:38: error: expected ',' or '...' before '<' token
  821 |      void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                                      ^
p1806.cpp:821:91: error: expected initializer before 'noexcept'
  821 |      void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                                                                                           ^~~~~~~~
p1806.cpp:823:11: error: variable or field 'atomic_init' declared void
  823 |      void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |           ^~~~~~~~~~~
p1806.cpp:823:23: error: 'atomic' was not declared in this scope
  823 |      void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                       ^~~~~~
p1806.cpp:823:23: note: 'std::atomic' is only available from C++11 onwards
p1806.cpp:823:31: error: expected primary-expression before '>' token
  823 |      void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                               ^
p1806.cpp:823:34: error: 'object' was not declared in this scope
  823 |      void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                                  ^~~~~~
p1806.cpp:823:51: error: expected nested-name-specifier before 'atomic'
  823 |      void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                                                   ^~~~~~
p1806.cpp:823:51: error: expected '(' before 'atomic'
  823 |      void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
      |                                                   ^~~~~~
      |                                                   (
p1806.cpp:830:1: error: 'atomic_flag' does not name a type
  830 | atomic_flag guard = ATOMIC_FLAG_INIT;
      | ^~~~~~~~~~~

$ g++ p1806.cpp -std=2b -o p1806g -I. -Wall
p1806.cpp:216:1: error: extended character — is not valid in an identifier
  216 | — If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
      | ^
p1806.cpp:216:61: error: extended character — is not valid in an identifier
  216 | — If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
      |                                                             ^
p1806.cpp:799: warning: "ATOMIC_VAR_INIT" redefined
  799 | #define ATOMIC_VAR_INIT(value) see_below
      | 
In file included from /usr/local/include/c++/12.1.0/atomic:41,
                 from N4910.h:11,
                 from p1806.cpp:10:
/usr/local/include/c++/12.1.0/bits/atomic_base.h:159: note: this is the location of the previous definition
  159 | #define ATOMIC_VAR_INIT(_VI) { _VI }
      | 
p1806.cpp:800: warning: "ATOMIC_FLAG_INIT" redefined
  800 | #define ATOMIC_FLAG_INIT see_below
      | 
/usr/local/include/c++/12.1.0/bits/atomic_base.h:193: note: this is the location of the previous definition
  193 | #define ATOMIC_FLAG_INIT { 0 }
      | 
p1806.cpp:22:12: warning: comparison of enumeration type 'E1' with floating-point type 'double' is deprecated [-Wdeprecated-enum-float-conversion]
   22 | bool b = e <= 3.7;
      |          ~~^~~~~~
p1806.cpp:23:11: warning: arithmetic between different enumeration types 'E2' and 'E1' is deprecated [-Wdeprecated-enum-enum-conversion]
   23 | int k = f - e;
      |         ~~^~~
p1806.cpp:24:14: error: invalid operands of types 'E1' and 'E2' to binary 'operator<=>'
   24 | auto cmp = e <=> f;
      |            ~ ^~~ ~
      |            |     |
      |            E1    E2
p1806.cpp: In lambda function:
p1806.cpp:32:16: warning: implicit capture of 'this' via '[=]' is deprecated in C++20 [-Wdeprecated]
   32 |       auto f = [=]() { x = n; };
      |                ^
p1806.cpp:32:16: note: add explicit 'this' or '*this' capture
p1806.cpp: At global scope:
p1806.cpp:41:18: warning: comparison between two arrays is deprecated in C++20 [-Warray-compare]
   41 | bool same = arr1 == arr2;
      |             ~~~~~^~~~~~~
p1806.cpp:41:18: note: use unary '+' which decays operands to pointers or '&arr1[0] == &arr2[0]' to compare the addresses
p1806.cpp:42:17: error: invalid operands of types 'int [5]' and 'int [5]' to binary 'operator<=>'
   42 | auto cmp = arr1 <=> arr2;
      |            ~~~~ ^~~ ~~~~
      |            |        |
      |            int [5]  int [5]
p1806.cpp:49:1: error: expected unqualified-id before '++' token
   49 | ++velociraptor; // deprecated
      | ^~
p1806.cpp:54:3: error: 'brachiosaur' does not name a type
   54 |   brachiosaur = neck;
      |   ^~~~~~~~~~~
p1806.cpp:55:3: error: 'tail' does not name a type
   55 |   tail = brachiosaur;
      |   ^~~~
p1806.cpp:56:3: error: 'tail' does not name a type
   56 |   tail = brachiosaur = neck;
      |   ^~~~
p1806.cpp:57:3: error: 'brachiosaur' does not name a type
   57 |   brachiosaur += neck;
      |   ^~~~~~~~~~~
p1806.cpp:58:3: error: 'brachiosaur' does not name a type
   58 |   brachiosaur = brachiosaur + neck;
      |   ^~~~~~~~~~~
p1806.cpp:64:6: warning: 'volatile'-qualified return type is deprecated [-Wvolatile]
   64 |      volatile struct amber jurassic();
      |      ^~~~~~~~
p1806.cpp:65:31: warning: 'volatile'-qualified parameter is deprecated [-Wvolatile]
   65 |      void trex(volatile short left_arm, volatile short right_arm);
      |                ~~~~~~~~~~~~~~~^~~~~~~~
p1806.cpp:65:56: warning: 'volatile'-qualified parameter is deprecated [-Wvolatile]
   65 |      void trex(volatile short left_arm, volatile short right_arm);
      |                                         ~~~~~~~~~~~~~~~^~~~~~~~~
p1806.cpp: In function 'void park(linhenykus)':
p1806.cpp:71:8: warning: 'volatile'-qualified structured binding is deprecated [-Wvolatile]
   71 |        volatile auto [what_is_this] = alvarezsauroid;
      |        ^~~~~~~~
p1806.cpp: At global scope:
p1806.cpp:92:3: error: reference to 'A' is ambiguous
   92 |   A h();
      |   ^
p1806.cpp:89:12: note: candidates are: 'struct {anonymous}::A'
   89 |     struct A {
      |            ^
p1806.cpp:79:10: note:                 'struct A'
   79 |   struct A {
      |          ^
p1806.cpp: In function 'void g()':
p1806.cpp:93:20: error: reference to 'A' is ambiguous
   93 |   inline void g() {A().f();
      |                    ^
p1806.cpp:89:12: note: candidates are: 'struct {anonymous}::A'
   89 |     struct A {
      |            ^
p1806.cpp:79:10: note:                 'struct A'
   79 |   struct A {
      |          ^
p1806.cpp: At global scope:
p1806.cpp:163:22: error: 'T1' does not name a type; did you mean 'E1'?
  163 |     using strstate = T1;
      |                      ^~
      |                      E1
p1806.cpp:164:18: error: 'strstate' does not name a type
  164 |     static const strstate allocated;
      |                  ^~~~~~~~
p1806.cpp:165:18: error: 'strstate' does not name a type
  165 |     static const strstate constant;
      |                  ^~~~~~~~
p1806.cpp:166:18: error: 'strstate' does not name a type
  166 |     static const strstate dynamic;
      |                  ^~~~~~~~
p1806.cpp:167:18: error: 'strstate' does not name a type
  167 |     static const strstate frozen;
      |                  ^~~~~~~~
p1806.cpp:168:5: error: 'strstate' does not name a type
  168 |     strstate strmode;
      |     ^~~~~~~~
p1806.cpp:182:44: error: expected ',' or ';' before ')' token
  182 |           unsigned char* pbeg_arg = nullptr);
      |                                            ^
p1806.cpp:190:16: error: conflicting declaration 'signed char* pbeg_arg'
  190 |   signed char* pbeg_arg = nullptr);
      |                ^~~~~~~~
p1806.cpp:182:26: note: previous declaration as 'unsigned char* pbeg_arg'
  182 |           unsigned char* pbeg_arg = nullptr);
      |                          ^~~~~~~~
p1806.cpp:192:73: error: expected constructor, destructor, or type conversion before ';' token
  192 |      strstreambuf(void* (*palloc_arg)(size_t), void (*pfree_arg)(void*));
      |                                                                         ^
p1806.cpp:194:75: error: expected constructor, destructor, or type conversion before ';' token
  194 |      strstreambuf(char* gnext_arg, streamsize n, char* pbeg_arg = nullptr);
      |                                                                           ^
p1806.cpp:196:46: error: expected constructor, destructor, or type conversion before ';' token
  196 |              signed char* pbeg_arg = nullptr);
      |                                              ^
p1806.cpp:197:87: error: expected constructor, destructor, or type conversion before ';' token
  197 | strstreambuf(unsigned char* gnext_arg, streamsize n,  signed char* pbeg_arg = nullptr);
      |                                                                                       ^
p1806.cpp:203:7: error: expected constructor, destructor, or type conversion before '(' token
  203 |   setg(gnext_arg, gnext_arg, gnext_arg + N);
      |       ^
p1806.cpp:205:7: error: expected constructor, destructor, or type conversion before '(' token
  205 |   setg(gnext_arg, gnext_arg, pbeg_arg);
      |       ^
p1806.cpp:206:7: error: expected constructor, destructor, or type conversion before '(' token
  206 |   setp(pbeg_arg,  pbeg_arg + N);
      |       ^
p1806.cpp:207:50: error: expected constructor, destructor, or type conversion before ';' token
  207 | strstreambuf(const char* gnext_arg, streamsize n);
      |                                                  ^
p1806.cpp:208:57: error: expected constructor, destructor, or type conversion before ';' token
  208 | strstreambuf(const signed char* gnext_arg, streamsize n);
      |                                                         ^
p1806.cpp:209:59: error: expected constructor, destructor, or type conversion before ';' token
  209 | strstreambuf(const unsigned char* gnext_arg, streamsize n);
      |                                                           ^
p1806.cpp:211:9: error: declaration of '~ std::strstreambuf' as non-member
  211 | virtual ~strstreambuf();
      |         ^~~~~~~~~~~~~
p1806.cpp:216:1: error: '\U00002014' does not name a type
  216 | — If freezefl is true, the function sets frozen in strmode. — Otherwise, it clears frozen in strmode.
      | ^
p1806.cpp:219:14: error: non-member function 'int pcount()' cannot have cv-qualifier
  219 | int pcount() const;
      |              ^~~~~
p1806.cpp:222:1: error: 'int_type' does not name a type
  222 | int_type overflow(int_type c = EOF) override;
      | ^~~~~~~~
p1806.cpp:236:1: error: 'int_type' does not name a type
  236 | int_type pbackfail(int_type c = EOF) override;
      | ^~~~~~~~
p1806.cpp:245:1: error: 'int_type' does not name a type
  245 | int_type underflow() override;
      | ^~~~~~~~
p1806.cpp:252:1: error: 'pos_type' does not name a type
  252 | pos_type seekoff(off_type off, seekdir way, openmode which = in | out) override;
      | ^~~~~~~~
p1806.cpp:269:1: error: 'pos_type' does not name a type
  269 | pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out) override;
      | ^~~~~~~~
p1806.cpp:278:1: error: 'std::streambuf' {aka 'std::basic_streambuf<char>'} is not a template
  278 | streambuf<char>* setbuf(char* s, streamsize n) override;
      | ^~~~~~~~~
p1806.cpp:278:48: error: virt-specifiers in 'setbuf' not allowed outside a class definition
  278 | streambuf<char>* setbuf(char* s, streamsize n) override;
      |                                                ^~~~~~~~
p1806.cpp:295:10: error: ISO C++ forbids declaration of 'istrstream' with no type [-fpermissive]
  295 | explicit istrstream(const char* s);
      |          ^~~~~~~~~~
p1806.cpp:295:1: error: 'explicit' outside class declaration
  295 | explicit istrstream(const char* s);
      | ^~~~~~~~
p1806.cpp:296:10: error: reference to 'istrstream' is ambiguous
  296 | explicit istrstream(char* s);
      |          ^~~~~~~~~~
p1806.cpp:284:11: note: candidates are: 'class std::istrstream'
  284 |     class istrstream : public basic_istream<char> {
      |           ^~~~~~~~~~
p1806.cpp:295:10: note:                 'int istrstream(const char*)'
  295 | explicit istrstream(const char* s);
      |          ^~~~~~~~~~
p1806.cpp:296:10: error: ISO C++ forbids declaration of 'istrstream' with no type [-fpermissive]
  296 | explicit istrstream(char* s);
      |          ^~~~~~~~~~
p1806.cpp:296:1: error: 'explicit' outside class declaration
  296 | explicit istrstream(char* s);
      | ^~~~~~~~
p1806.cpp:300:1: error: reference to 'istrstream' is ambiguous
  300 | istrstream(const char* s, streamsize n);
      | ^~~~~~~~~~
p1806.cpp:284:11: note: candidates are: 'class std::istrstream'
  284 |     class istrstream : public basic_istream<char> {
      |           ^~~~~~~~~~
p1806.cpp:296:10: note:                 'int istrstream(char*)'
  296 | explicit istrstream(char* s);
      |          ^~~~~~~~~~
p1806.cpp:295:10: note:                 'int istrstream(const char*)'
  295 | explicit istrstream(const char* s);
      |          ^~~~~~~~~~
p1806.cpp:300:40: error: expected constructor, destructor, or type conversion before ';' token
  300 | istrstream(const char* s, streamsize n);
      |                                        ^
p1806.cpp:301:1: error: reference to 'istrstream' is ambiguous
  301 | istrstream(char* s, streamsize n);
      | ^~~~~~~~~~
p1806.cpp:284:11: note: candidates are: 'class std::istrstream'
  284 |     class istrstream : public basic_istream<char> {
      |           ^~~~~~~~~~
p1806.cpp:296:10: note:                 'int istrstream(char*)'
  296 | explicit istrstream(char* s);
      |          ^~~~~~~~~~
p1806.cpp:295:10: note:                 'int istrstream(const char*)'
  295 | explicit istrstream(const char* s);
      |          ^~~~~~~~~~
p1806.cpp:301:34: error: expected constructor, destructor, or type conversion before ';' token
  301 | istrstream(char* s, streamsize n);
      |                                  ^
p1806.cpp:304:23: error: non-member function 'std::strstreambuf* rdbuf()' cannot have cv-qualifier
  304 | strstreambuf* rdbuf() const;
      |                       ^~~~~
p1806.cpp:326:13: error: expected constructor, destructor, or type conversion before ';' token
  326 | ostrstream();
      |             ^
p1806.cpp:328:68: error: expected constructor, destructor, or type conversion before ';' token
  328 | ostrstream(char* s, int n, ios_base::openmode mode = ios_base::out);
      |                                                                    ^
p1806.cpp:359:23: error: non-member function 'std::strstreambuf* rdbuf()' cannot have cv-qualifier
  359 | strstreambuf* rdbuf() const;
      |                       ^~~~~
p1806.cpp:366:12: error: expected constructor, destructor, or type conversion before ';' token
  366 | strstream();
      |            ^
p1806.cpp:368:58: error: expected ',' or ';' before ')' token
  368 |      ios_base::openmode mode = ios_base::in|ios_base::out);
      |                                                          ^
p1806.cpp:371:1: error: expected unqualified-id before '+' token
  371 | + std::strlen(s)).
      | ^
p1806.cpp:377:32: error: redefinition of 'class std::allocator< <template-parameter-1-1> >'
  377 |        template<class T> class allocator {
      |                                ^~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/string:41,
                 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:
/usr/local/include/c++/12.1.0/bits/allocator.h:124:11: note: previous definition of 'class std::allocator< <template-parameter-1-1> >'
  124 |     class allocator : public __allocator_base<_Tp>
      |           ^~~~~~~~~
p1806.cpp:385:23: error: non-member function 'std::strstreambuf* rdbuf()' cannot have cv-qualifier
  385 | strstreambuf* rdbuf() const;
      |                       ^~~~~
p1806.cpp:405:41: error: redefinition of 'template<class T> constexpr const bool std::is_pod_v'
  405 | template<class T> inline constexpr bool is_pod_v = is_pod<T>::value; template<size_t Len, size_t Align = default-alignment > // see below
      |                                         ^~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/move.h:57,
                 from /usr/local/include/c++/12.1.0/bits/exception_ptr.h:43,
                 from /usr/local/include/c++/12.1.0/exception:168,
                 from /usr/local/include/c++/12.1.0/ios:39:
/usr/local/include/c++/12.1.0/type_traits:3180:25: note: 'template<class _Tp> constexpr const bool std::is_pod_v<_Tp>' previously declared here
 3180 |   inline constexpr bool is_pod_v = is_pod<_Tp>::value;
      |                         ^~~~~~~~
p1806.cpp:405:52: warning: 'template<class _Tp> struct std::is_pod' is deprecated: use is_standard_layout && is_trivial instead [-Wdeprecated-declarations]
  405 | template<class T> inline constexpr bool is_pod_v = is_pod<T>::value; template<size_t Len, size_t Align = default-alignment > // see below
      |                                                    ^~~~~~
/usr/local/include/c++/12.1.0/type_traits:757:5: note: declared here
  757 |     is_pod
      |     ^~~~~~
p1806.cpp:405:106: error: expected primary-expression before 'default'
  405 | template<class T> inline constexpr bool is_pod_v = is_pod<T>::value; template<size_t Len, size_t Align = default-alignment > // see below
      |                                                                                                          ^~~~~~~
p1806.cpp:405:106: error: expected '>' before 'default'
p1806.cpp:405:106: error: redefinition of default argument for 'long unsigned int Align'
/usr/local/include/c++/12.1.0/type_traits:2112:68: note: original definition appeared here
 2112 |            __alignof__(typename __aligned_storage_msa<_Len>::__type)>
      |                                                                    ^
p1806.cpp:407:37: error: expected primary-expression before 'default'
  407 | template<size_t Len, size_t Align = default-alignment > // see below
      |                                     ^~~~~~~
p1806.cpp:407:37: error: expected '>' before 'default'
p1806.cpp:421:37: error: expected primary-expression before 'default'
  421 | template<size_t Len, size_t Align = default-alignment>
      |                                     ^~~~~~~
p1806.cpp:421:37: error: expected '>' before 'default'
p1806.cpp:425:1: error: expected unqualified-id before '[' token
  425 | [// Note 2: Uses of aligned_storage<Len, Align>::type can be replaced by an array std::byte[Len] declared with alignas(Align).
      | ^
p1806.cpp:466:1: error: expected declaration before '}' token
  466 | }; }
      | ^
p1806.cpp:466:4: error: expected declaration before '}' token
  466 | }; }
      |    ^
p1806.cpp:471:42: error: redefinition of default argument for 'class Distance'
  471 |        template<class Category, class T, class Distance = ptrdiff_t,
      |                                          ^~~~~
In file included from /usr/local/include/c++/12.1.0/bits/stl_construct.h:61,
                 from /usr/local/include/c++/12.1.0/bits/char_traits.h:46,
                 from /usr/local/include/c++/12.1.0/ios:40:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:125:46: note: original definition appeared here
  125 |   template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
      |                                              ^~~~~~~~
p1806.cpp:491:11: error: redefinition of 'class std::move_iterator<_Iterator>'
  491 |     class move_iterator {
      |           ^~~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/string:47:
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:1445:11: note: previous definition of 'class std::move_iterator<_Iterator>'
 1445 |     class move_iterator
      |           ^~~~~~~~~~~~~
p1806.cpp:496:11: error: 'pointer' does not name a type
  496 | constexpr pointer operator->() const;
      |           ^~~~~~~
p1806.cpp:557:40: error: expected constructor, destructor, or type conversion before '(' token
  557 |   atomic_compare_exchange_weak_explicit(p, v, w, memory_order::seq_cst, memory_order::seq_cst)
      |                                        ^
p1806.cpp:565:15: error: 'seq_cst' in 'enum class std::memory_order' does not name a type
  565 | memory_order::seq_cst)
      |               ^~~~~~~
/usr/local/include/c++/12.1.0/bits/atomic_base.h:68:7: note: 'std::memory_order::seq_cst' declared here
   68 |       seq_cst
      |       ^~~~~~~
p1806.cpp:646:50: error: aggregate 'std::wstring_convert<std::codecvt_utf8<wchar_t> > myconv' has incomplete type and cannot be defined
  646 |      wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
      |                                                  ^~~~~~
p1806.cpp:648:11: error: 'cout' in namespace 'std' does not name a type
  648 |      std::cout << mbstring;
      |           ^~~~
/usr/local/include/c++/12.1.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
p1806.cpp:650:32: error: redefinition of default argument for 'class Elem'
  650 |        template<class Codecvt, class Elem = wchar_t,
      |                                ^~~~~
p1806.cpp:629:34: note: original definition appeared here
  629 |          template<class Codecvt, class Elem = wchar_t,
      |                                  ^~~~~
p1806.cpp:693:1: error: 'wide_string' does not name a type
  693 | wide_string from_bytes(char byte);
      | ^~~~~~~~~~~
p1806.cpp:694:1: error: 'wide_string' does not name a type
  694 | wide_string from_bytes(const char* ptr);
      | ^~~~~~~~~~~
p1806.cpp:695:1: error: 'wide_string' does not name a type
  695 | wide_string from_bytes(const byte_string& str);
      | ^~~~~~~~~~~
p1806.cpp:696:1: error: 'wide_string' does not name a type
  696 | wide_string from_bytes(const char* first, const char* last);
      | ^~~~~~~~~~~
p1806.cpp:701:27: error: 'wide_string' has not been declared
  701 | using int_type = typename wide_string::traits_type::int_type;
      |                           ^~~~~~~~~~~
p1806.cpp:704:29: error: 'Codecvt' has not been declared
  704 | using state_type = typename Codecvt::state_type;
      |                             ^~~~~~~
p1806.cpp:706:1: error: 'byte_string' does not name a type
  706 | byte_string to_bytes(Elem wchar);
      | ^~~~~~~~~~~
p1806.cpp:707:1: error: 'byte_string' does not name a type
  707 | byte_string to_bytes(const Elem* wptr);
      | ^~~~~~~~~~~
p1806.cpp:708:1: error: 'byte_string' does not name a type
  708 | byte_string to_bytes(const wide_string& wstr);
      | ^~~~~~~~~~~
p1806.cpp:709:1: error: 'byte_string' does not name a type
  709 | byte_string to_bytes(const Elem* first, const Elem* last);
      | ^~~~~~~~~~~
p1806.cpp:714:34: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                  ^~~~
p1806.cpp:714:52: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                    ^~~~
p1806.cpp:714:56: error: template argument 1 is invalid
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                        ^
p1806.cpp:714:59: error: 'WideAlloc' was not declared in this scope; did you mean 'realloc'?
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                           ^~~~~~~~~
      |                                                           realloc
p1806.cpp:714:34: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                  ^~~~
p1806.cpp:714:59: error: 'WideAlloc' was not declared in this scope; did you mean 'realloc'?
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                           ^~~~~~~~~
      |                                                           realloc
p1806.cpp:714:34: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                  ^~~~
p1806.cpp:714:59: error: 'WideAlloc' was not declared in this scope; did you mean 'realloc'?
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                           ^~~~~~~~~
      |                                                           realloc
p1806.cpp:714:34: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                  ^~~~
p1806.cpp:714:59: error: 'WideAlloc' was not declared in this scope; did you mean 'realloc'?
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                           ^~~~~~~~~
      |                                                           realloc
p1806.cpp:714:34: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                  ^~~~
p1806.cpp:714:59: error: 'WideAlloc' was not declared in this scope; did you mean 'realloc'?
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                           ^~~~~~~~~
      |                                                           realloc
p1806.cpp:714:34: error: 'Elem' was not declared in this scope
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                  ^~~~
p1806.cpp:714:59: error: 'WideAlloc' was not declared in this scope; did you mean 'realloc'?
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                                                           ^~~~~~~~~
      |                                                           realloc
p1806.cpp:714:21: error: reference to 'basic_string' is ambiguous
  714 | using wide_string = basic_string<Elem, char_traits<Elem>, WideAlloc>;
      |                     ^~~~~~~~~~~~
p1806.cpp:578:14: note: candidates are: 'template<class charT, class traits, class Allocator> class std::basic_string'
  578 |        class basic_string {
      |              ^~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/iosfwd:39,
                 from /usr/local/include/c++/12.1.0/ios:38:
/usr/local/include/c++/12.1.0/bits/stringfwd.h:72:11: note:                 'template<class _CharT, class _Traits, class _Alloc> class std::__cxx11::basic_string'
   72 |     class basic_string;
      |           ^~~~~~~~~~~~
p1806.cpp:719:33: error: expected ')' before '*' token
  719 | explicit wstring_convert(Codecvt* pcvt);
      |                         ~       ^
      |                                 )
p1806.cpp:720:24: error: expected ')' before '*' token
  720 | wstring_convert(Codecvt* pcvt, state_type state);
      |                ~       ^
      |                        )
p1806.cpp:721:32: error: 'byte_string' does not name a type
  721 | explicit wstring_convert(const byte_string& byte_err,
      |                                ^~~~~~~~~~~
p1806.cpp:722:11: error: 'wide_string' does not name a type
  722 |     const wide_string& wide_err = wide_string());
      |           ^~~~~~~~~~~
p1806.cpp:722:35: error: 'wide_string' was not declared in this scope
  722 |     const wide_string& wide_err = wide_string());
      |                                   ^~~~~~~~~~~
p1806.cpp:721:10: error: deduction guide for 'std::wstring_convert<Codecvt, Elem, WideAlloc, ByteAlloc>' must have trailing return type
  721 | explicit wstring_convert(const byte_string& byte_err,
      |          ^~~~~~~~~~~~~~~
p1806.cpp:632:18: note: 'template<class Codecvt, class Elem, class WideAlloc, class ByteAlloc> class std::wstring_convert' declared here
  632 |            class wstring_convert;
      |                  ^~~~~~~~~~~~~~~
p1806.cpp:727:32: error: redefinition of default argument for 'class Elem'
  727 |        template<class Codecvt, class Elem = wchar_t, class Tr = char_traits<Elem>>
      |                                ^~~~~
p1806.cpp:633:34: note: original definition appeared here
  633 |          template<class Codecvt, class Elem = wchar_t,
      |                                  ^~~~~
p1806.cpp:744:3: error: 'state_type' does not name a type
  744 |   state_type state() const;
      |   ^~~~~~~~~~
p1806.cpp:745:1: error: expected unqualified-id before 'private'
  745 | private:
      | ^~~~~~~
p1806.cpp:747:3: error: 'Codecvt' does not name a type
  747 |   Codecvt* cvtptr;
      |   ^~~~~~~
p1806.cpp:748:3: error: 'state_type' does not name a type
  748 |   state_type cvtstate;
      |   ^~~~~~~~~~
p1806.cpp:752:1: error: 'state_type' does not name a type
  752 | state_type state() const;
      | ^~~~~~~~~~
p1806.cpp:759:23: error: 'filesystem' is not a namespace-name; did you mean 'system'?
  759 |   namespace fs = std::filesystem;
      |                       ^~~~~~~~~~
      |                       system
p1806.cpp:760:29: error: 'read_utf8_data' was not declared in this scope
  760 |   std::string utf8_string = read_utf8_data();
      |                             ^~~~~~~~~~~~~~
p1806.cpp:761:3: error: 'fs' does not name a type
  761 |   fs::create_directory(fs::u8path(utf8_string));
      |   ^~
p1806.cpp:762:20: error: non-member function 'std::streambuf* rdbuf()' cannot have cv-qualifier
  762 | streambuf* rdbuf() const;
      |                    ^~~~~
p1806.cpp:762:12: error: ambiguating new declaration of 'std::streambuf* rdbuf()'
  762 | streambuf* rdbuf() const;
      |            ^~~~~
p1806.cpp:385:15: note: old declaration 'std::strstreambuf* rdbuf()'
  385 | strstreambuf* rdbuf() const;
      |               ^~~~~
p1806.cpp:769:1: error: invalid declarator before 'streambuf'
  769 | streambuf* rdbuf(streambuf* bytebuf);
      | ^~~~~~~~~
p1806.cpp:771:29: error: 'Codecvt' has not been declared
  771 | using state_type = typename Codecvt::state_type;
      |                             ^~~~~~~
p1806.cpp:775:5: error: 'Codecvt' has not been declared
  775 |     Codecvt* pcvt = new Codecvt,
      |     ^~~~~~~
p1806.cpp:775:25: error: 'Codecvt' does not name a type
  775 |     Codecvt* pcvt = new Codecvt,
      |                         ^~~~~~~
p1806.cpp:776:5: error: 'state_type' has not been declared
  776 |     state_type state = state_type());
      |     ^~~~~~~~~~
p1806.cpp:776:24: error: 'state_type' was not declared in this scope
  776 |     state_type state = state_type());
      |                        ^~~~~~~~~~
p1806.cpp:773:10: error: deduction guide for 'std::wbuffer_convert<Codecvt, Elem, Tr>' must have trailing return type
  773 | explicit wbuffer_convert(
      |          ^~~~~~~~~~~~~~~
p1806.cpp:635:18: note: 'template<class Codecvt, class Elem, class Tr> class std::wbuffer_convert' declared here
  635 |            class wbuffer_convert;
      |                  ^~~~~~~~~~~~~~~
p1806.cpp:779:1: error: 'cvtptr' does not name a type
  779 | cvtptr to pcvt, and initializes cvtstate to state. ~wbuffer_convert();
      | ^~~~~~
p1806.cpp:784:3: error: 'path' does not name a type
  784 |   path u8path(const Source& source);
      |   ^~~~
p1806.cpp:786:3: error: 'path' does not name a type
  786 |   path u8path(InputIterator first, InputIterator last);
      |   ^~~~
p1806.cpp:804:11: error: variable or field 'store' declared void
  804 |      void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |           ^~~~~
p1806.cpp:804:17: error: 'T' was not declared in this scope
  804 |      void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |                 ^
p1806.cpp:804:41: error: expected primary-expression before 'order'
  804 |      void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |                                         ^~~~~
p1806.cpp:805:6: error: 'T' does not name a type
  805 |      T operator=(T desired) volatile noexcept;
      |      ^
p1806.cpp:806:6: error: 'T' does not name a type
  806 |      T load(memory_order order = memory_order::seq_cst) const volatile noexcept;
      |      ^
p1806.cpp:807:15: error: expected type-specifier before 'T'
  807 |      operator T() const volatile noexcept;
      |               ^
p1806.cpp:808:6: error: 'T' does not name a type
  808 |      T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
      |      ^
p1806.cpp:809:33: error: 'T' was not declared in this scope
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |                                 ^
p1806.cpp:809:36: error: 'expected' was not declared in this scope; did you mean 'execve'?
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |                                    ^~~~~~~~
      |                                    execve
p1806.cpp:809:46: error: 'T' was not declared in this scope
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |                                              ^
p1806.cpp:810:46: error: expected primary-expression before 'success'
  810 |                                 memory_order success, memory_order failure) volatile noexcept;
      |                                              ^~~~~~~
p1806.cpp:810:68: error: expected primary-expression before 'failure'
  810 |                                 memory_order success, memory_order failure) volatile noexcept;
      |                                                                    ^~~~~~~
p1806.cpp:810:75: error: expression list treated as compound expression in initializer [-fpermissive]
  810 |                                 memory_order success, memory_order failure) volatile noexcept;
      |                                                                           ^
p1806.cpp:811:35: error: 'T' was not declared in this scope
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |                                   ^
p1806.cpp:811:38: error: 'expected' was not declared in this scope; did you mean 'execve'?
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |                                      ^~~~~~~~
      |                                      execve
p1806.cpp:811:48: error: 'T' was not declared in this scope
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |                                                ^
p1806.cpp:812:48: error: expected primary-expression before 'success'
  812 |                                   memory_order success, memory_order failure) volatile noexcept;
      |                                                ^~~~~~~
p1806.cpp:812:70: error: expected primary-expression before 'failure'
  812 |                                   memory_order success, memory_order failure) volatile noexcept;
      |                                                                      ^~~~~~~
p1806.cpp:812:77: error: expression list treated as compound expression in initializer [-fpermissive]
  812 |                                   memory_order success, memory_order failure) volatile noexcept;
      |                                                                             ^
p1806.cpp:813:11: error: redefinition of 'bool compare_exchange_weak'
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~
p1806.cpp:809:11: note: 'bool compare_exchange_weak' previously defined here
  809 |      bool compare_exchange_weak(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~
p1806.cpp:813:33: error: 'T' was not declared in this scope
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |                                 ^
p1806.cpp:813:36: error: 'expected' was not declared in this scope; did you mean 'execve'?
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |                                    ^~~~~~~~
      |                                    execve
p1806.cpp:813:46: error: 'T' was not declared in this scope
  813 |      bool compare_exchange_weak(T& expected, T desired,
      |                                              ^
p1806.cpp:814:46: error: expected primary-expression before 'order'
  814 |                                 memory_order order = memory_order::seq_cst) volatile noexcept;
      |                                              ^~~~~
p1806.cpp:815:11: error: redefinition of 'bool compare_exchange_strong'
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:811:11: note: 'bool compare_exchange_strong' previously defined here
  811 |      bool compare_exchange_strong(T& expected, T desired,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
p1806.cpp:815:35: error: 'T' was not declared in this scope
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |                                   ^
p1806.cpp:815:38: error: 'expected' was not declared in this scope; did you mean 'execve'?
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |                                      ^~~~~~~~
      |                                      execve
p1806.cpp:815:48: error: 'T' was not declared in this scope
  815 |      bool compare_exchange_strong(T& expected, T desired,
      |                                                ^
p1806.cpp:816:14: error: expected primary-expression before 'order'
  816 | memory_order order = memory_order::seq_cst) volatile noexcept; T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
      |              ^~~~~
p1806.cpp:816:64: error: 'T' does not name a type
  816 | memory_order order = memory_order::seq_cst) volatile noexcept; T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
      |                                                                ^
p1806.cpp:817:1: error: 'T' does not name a type
  817 | T operator op=(T operand) volatile noexcept;
      | ^
p1806.cpp:818:1: error: 'T' does not name a type
  818 | T* fetch_key(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;
      | ^
p1806.cpp:828:26: error: 'see_below' was not declared in this scope
  828 | #define ATOMIC_FLAG_INIT see_below
      |                          ^~~~~~~~~
p1806.cpp:830:21: note: in expansion of macro 'ATOMIC_FLAG_INIT'
  830 | atomic_flag guard = ATOMIC_FLAG_INIT;
      |                     ^~~~~~~~~~~~~~~~
```

# 検討事項(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 初稿 　20221010