31.11 Synchronized output streams [syncstream] C++N4910:2022 (694) p1572.cpp

エンジニア夏休み企画
https://qiita.com/official-events/6d31965c499a69377c0b

個人開発と読書感想文に焦点を当てたのは良い企画だと思った。

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

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

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

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

## 個人開発
【個人開発】　効率的な背景　＜エンジニア夏休み企画＞
https://qiita.com/kaizen_nagoya/items/3ebab436e63731e4b885

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

### 箱庭
箱庭もくもく会 #10 日時：2022/09/14(水) 17:30-19:30
https://hakoniwa.connpass.com/event/258129/

# はじめに(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

### 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

## 編纂器(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.

# 31.11 Synchronized output streams [syncstream] C++N4910:2022 (694) p1572.cpp

## 算譜(source code)

```c++:p1572.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 = "31.11 Synchronized output streams [syncstream] C++N4910:2022 (694) p1572.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;

// 31.11.1 Header <syncstream> synopsis [syncstream.syn]
#include <ostream> // see 31.7.2
namespace std {
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
class basic_syncbuf;
// 31.11.2.6, specialized algorithms
template<class charT, class traits, class Allocator>
void swap(basic_syncbuf<charT, traits, Allocator>&,
          basic_syncbuf<charT, traits, Allocator>&);
using syncbuf = basic_syncbuf<char>;
using wsyncbuf = basic_syncbuf<wchar_t>;
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
class basic_osyncstream;
using osyncstream = basic_osyncstream<char>;
using wosyncstream = basic_osyncstream<wchar_t>;
}
//  The header <syncstream> provides a mechanism to synchronize execution agents writing to the same stream.
// 31.11.2 Class template basic_syncbuf [syncstream.syncbuf]
// 31.11.2.1 Overview [syncstream.syncbuf.overview]
namespace std {
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
class basic_syncbuf : public basic_streambuf<charT, traits> {
public:
    using char_type = charT;
    using int_type = typename traits::int_type;
    using pos_type = typename traits::pos_type;
    using off_type = typename traits::off_type;
    using traits_type = traits;
    using allocator_type = Allocator;
    using streambuf_type = basic_streambuf<charT, traits>;
// 31.11.2.2, construction and destruction basic_syncbuf()
:
    basic_syncbuf(nullptr) {}
    explicit basic_syncbuf(streambuf_type* obuf)
        : basic_syncbuf(obuf, Allocator()) {} basic_syncbuf(streambuf_type*, const Allocator&);
    basic_syncbuf(basic_syncbuf&&);
    ~basic_syncbuf();
// 31.11.2.3, assignment and swap basic_syncbuf& operator=(basic_syncbuf&&); void swap(basic_syncbuf&);
// 31.11.2.4, member functions
    bool emit();
    streambuf_type* get_wrapped() const noexcept;
    allocator_type get_allocator() const noexcept;
    void set_emit_on_sync(bool) noexcept;
protected:
// 31.11.2.5, overridden virtual functions int sync() override;
private:
    streambuf_type* wrapped;
    bool emit_on_sync{};
};
}
// exposition only // exposition only
//  Class template basic_syncbuf stores character data written to it, known as the associated output, into internal buffers allocated using the object’s allocator. The associated output is transferred to the wrapped stream buffer object *wrapped when emit() is called or when the basic_syncbuf object is destroyed. Such transfers are atomic with respect to transfers by other basic_syncbuf objects with the same wrapped stream buffer object.
// 31.11.2.2 Construction and destruction [syncstream.syncbuf.cons]
basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
// Effects: Sets wrapped to obuf.
// Postconditions: get_wrapped() == obuf and get_allocator() == allocator are true.
// Throws: Nothing unless an exception is thrown by the construction of a mutex or by memory allocation.
// Remarks: A copy of allocator is used to allocate memory for internal buffers holding the associated output.
basic_syncbuf(basic_syncbuf&& other);
// Postconditions: The value returned by this->get_wrapped() is the value returned by other.get_- wrapped() prior to calling this constructor. Output stored in other prior to calling this constructor will be stored in *this afterwards. other.pbase() == other.pptr() and other.get_wrapped() == nullptr are true.
// Remarks: This constructor disassociates other from its wrapped stream buffer, ensuring destruction of other produces no output.
~basic_syncbuf();
// Effects: Calls emit().
// Throws: Nothing. If an exception is thrown from emit(), the destructor catches and ignores that exception.
// 31.11.2.3 Assignment and swap [syncstream.syncbuf.assign]
basic_syncbuf& operator=(basic_syncbuf&& rhs);
// Effects: Calls emit() then move assigns from rhs. After the move assignment *this has the observable state it would have had if it had been move constructed from rhs (31.11.2.2).
// Postconditions: — rhs.get_wrapped() == nullptr is true.
// — this->get_allocator() == rhs.get_allocator() is true when allocator_traits<Allocator>::propagate_on_container_move_assignment::value is true; otherwise, the allocator is unchanged. Returns: *this.
// Remarks: This assignment operator disassociates rhs from its wrapped stream buffer, ensuring destruction of rhs produces no output.
void swap(basic_syncbuf& other);
// Preconditions: Either allocator_traits<Allocator>::propagate_on_container_swap::value is true or this->get_allocator() == other.get_allocator() is true.
// Effects: Exchanges the state of *this and other.
// 31.11.2.4 Member functions [syncstream.syncbuf.members]
bool emit();
// Effects: Atomically transfers the associated output of *this to the stream buffer *wrapped, so that it appears in the output stream as a contiguous sequence of characters. wrapped->pubsync() is called if and only if a call was made to sync() since the most recent call to emit(), if any.
// Synchronization: All emit() calls transferring characters to the same stream buffer object appear to execute in a total order consistent with the “happens before” relation (6.9.2.2), where each emit() call synchronizes with subsequent emit() calls in that total order.
// Postconditions: On success, the associated output is empty.
// Returns: true if all of the following conditions hold; otherwise false:
// — wrapped == nullptr is false.
// — All of the characters in the associated output were successfully transferred. —
// The call to wrapped->pubsync() (if any) succeeded.
// Remarks: May call member functions of wrapped while holding a lock uniquely associated with wrapped. streambuf_type* get_wrapped() const noexcept;
// Returns: wrapped.
allocator_type get_allocator() const noexcept;
// Returns: A copy of the allocator that was set in the constructor or assignment operator.
void set_emit_on_sync(bool b) noexcept;
// Effects: emit_on_sync = b.
// 31.11.2.5 Overridden virtual functions [syncstream.syncbuf.virtuals]
int sync() override;
// Effects: Records that the wrapped stream buffer is to be flushed. Then, if emit_on_sync is true, calls emit().
// [Note 1: If emit_on_sync is false, the actual flush is delayed until a call to emit(). —end note] Returns: If emit() was called and returned false, returns -1; otherwise 0.
// 31.11.2.6 Specialized algorithms [syncstream.syncbuf.special]
template<class charT, class traits, class Allocator>
void swap(basic_syncbuf<charT, traits, Allocator>& a,
          basic_syncbuf<charT, traits, Allocator>& b);
// Effects: Equivalent to a.swap(b).
// 31.11.3 Class template basic_osyncstream [syncstream.osyncstream]
// 31.11.3.1 Overview [syncstream.osyncstream.overview]
namespace std {
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
class basic_osyncstream : public basic_ostream<charT, traits> {
public:
    using char_type = charT;
    using int_type = typename traits::int_type;
    using pos_type = typename traits::pos_type;
    using off_type = typename traits::off_type;
    using traits_type = traits;
    using allocator_type = Allocator;
    using streambuf_type = basic_streambuf<charT, traits>;
    using syncbuf_type   = basic_syncbuf<charT, traits, Allocator>;
// 31.11.3.2, construction and destruction
    basic_osyncstream(streambuf_type*, const Allocator&);
    explicit basic_osyncstream(streambuf_type* obuf)
        : basic_osyncstream(obuf, Allocator()) {}
    basic_osyncstream(basic_ostream<charT, traits>& os, const Allocator& allocator)
        : basic_osyncstream(os.rdbuf(), allocator) {}
    explicit basic_osyncstream(basic_ostream<charT, traits>& os)
        : basic_osyncstream(os, Allocator()) {} basic_osyncstream(basic_osyncstream&&) noexcept;
    ~basic_osyncstream();
// assignment
    basic_osyncstream& operator=(basic_osyncstream&&) noexcept;
// 31.11.3.3, member functions
    void emit();
    streambuf_type* get_wrapped() const noexcept;
    syncbuf_type* rdbuf() const noexcept {
        return const_cast<syncbuf_type*>(addressof(sb));
    }
private:
    syncbuf_type sb; // exposition only
};
}
//  Allocator shall meet the Cpp17Allocator requirements (16.4.4.6.1).
//  [Example 1: A named variable can be used within a block statement for streaming.
// Effects: Initializes sb from buf and allocator. Initializes the base class with basic_ostream<charT, traits>(addressof(sb)).
// [Note 1: The member functions of the provided stream buffer can be called from emit() while a lock is held, which might result in a deadlock if used incautiously.
// Returns: sb.get_wrapped().
void sample3() {
    osyncstream bout(cout);
    bout << "Hello, ";
    bout << "World!";
    bout << endl; // flush is noted bout << "and more!\n";
// characters are transferred and cout is flushed
//  [Example 2: A temporary object can be used for streaming within a single statement.
    osyncstream(cout) << "Hello, " << "World!" << '\n';
// In this example, cout is not flushed.
// 31.11.3.2 Construction and destruction [syncstream.osyncstream.cons]
    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
}
// Postconditions: get_wrapped() == buf is true. basic_osyncstream(basic_osyncstream&& other) noexcept;
// Effects: Move constructs the base class and sb from the corresponding subobjects of other, and calls basic_ostream<charT, traits>::set_rdbuf(addressof(sb)).
// Postconditions: The value returned by get_wrapped() is the value returned by os.get_wrapped() prior to calling this constructor. nullptr == other.get_wrapped() is true.
// 31.11.3.3 Member functions [syncstream.osyncstream.members]
void emit();
// Effects: Behaves as an unformatted output function (31.7.5.4). After constructing a sentry object, calls sb.emit(). If that call returns false, calls setstate(ios_base::badbit).
// [Example 1: A flush on a basic_osyncstream does not flush immediately: { }
bout << "Greetings." << '\n';
// characters transferred; cout not flushed
osyncstream bout(cout);
bout << "Hello," << '\n';
bout.emit();
bout << "World!" << endl;
bout.emit();
// no flush
// characters transferred; cout not flushed // flush noted; cout not flushed
// characters transferred; cout flushed
// no flush
// [Example 2: The function emit() can be used to handle exceptions from operations on the underlying stream.
void sample()
{
    osyncstream bout(cout);
    bout << "Hello, " << "World!" << '\n';
    try {
        bout.emit();
    } catch (...) {
// handle exception
    }
}
streambuf_type* get_wrapped() const noexcept;
// [Example 3: Obtaining the wrapped stream buffer with get_wrapped() allows wrapping it again with an osyncstream. For example,
void sample2()
{
    osyncstream bout1(cout);
    bout1 << "Hello, ";
    {
        osyncstream(bout1.get_wrapped()) << "Goodbye, " << "Planet!" << '\n';
    }
    bout1 << "World!" << '\n';
}
//produces the uninterleaved output Goodbye, Planet!  Hello, World!
int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}
```

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

```ubuntu:bash
$ clang++ p1572.cpp -std=03 -o p1572l -I. -Wall
In file included from p1572.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 \
 ^
p1572.cpp:17:95: error: a space is required between consecutive right angle brackets (use '> >')
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                                              ^~
                                                                                              > >
p1572.cpp:23:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using syncbuf = basic_syncbuf<char>;
                    ^
p1572.cpp:24:22: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using wsyncbuf = basic_syncbuf<wchar_t>;
                     ^
p1572.cpp:25:95: error: a space is required between consecutive right angle brackets (use '> >')
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                                              ^~
                                                                                              > >
p1572.cpp:27:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using osyncstream = basic_osyncstream<char>;
                        ^
p1572.cpp:28:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using wosyncstream = basic_osyncstream<wchar_t>;
                         ^
p1572.cpp:34:93: error: a space is required between consecutive right angle brackets (use '> >')
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                                            ^~
                                                                                            > >
p1572.cpp:34:40: error: template parameter redefines default argument
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                       ^
p1572.cpp:17:42: note: previous default template argument defined here
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                         ^
p1572.cpp:34:78: error: template parameter redefines default argument
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                             ^
p1572.cpp:17:80: note: previous default template argument defined here
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                               ^
p1572.cpp:37:19: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using char_type = charT;
                  ^
p1572.cpp:38:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using int_type = typename traits::int_type;
                 ^
p1572.cpp:39:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using pos_type = typename traits::pos_type;
                 ^
p1572.cpp:40:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using off_type = typename traits::off_type;
                 ^
p1572.cpp:41:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using traits_type = traits;
                    ^
p1572.cpp:42:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using allocator_type = Allocator;
                       ^
p1572.cpp:43:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using streambuf_type = basic_streambuf<charT, traits>;
                         ^
p1572.cpp:45:21: error: use of undeclared identifier 'nullptr'
    : basic_syncbuf(nullptr) {}
                    ^
p1572.cpp:45:5: error: C++ requires a type specifier for all declarations
    : basic_syncbuf(nullptr) {}
    ^
p1572.cpp:47:116: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
: basic_syncbuf(obuf, Allocator()) {} basic_syncbuf(streambuf_type*, const Allocator&); basic_syncbuf(basic_syncbuf&&);
                                                                                                                   ^
p1572.cpp:52:36: error: expected ';' at end of declaration list
streambuf_type* get_wrapped() const noexcept; allocator_type get_allocator() const noexcept; void set_emit_on_sync(bool) noexcept;
                                   ^
                                   ;
p1572.cpp:52:83: error: expected ';' at end of declaration list
streambuf_type* get_wrapped() const noexcept; allocator_type get_allocator() const noexcept; void set_emit_on_sync(bool) noexcept;
                                                                                  ^
                                                                                  ;
p1572.cpp:52:121: error: expected ';' at end of declaration list
streambuf_type* get_wrapped() const noexcept; allocator_type get_allocator() const noexcept; void set_emit_on_sync(bool) noexcept;
                                                                                                                        ^
                                                                                                                        ;
p1572.cpp:57:10: error: function definition does not declare parameters
    bool emit_on_sync{};
         ^
p1572.cpp:62:18: error: unknown type name 'streambuf_type'
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
                 ^
p1572.cpp:62:46: error: unknown type name 'Allocator'
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
                                             ^
p1572.cpp:62:4: error: C++ requires a type specifier for all declarations
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
   ^
p1572.cpp:67:6: error: C++ requires a type specifier for all declarations
     basic_syncbuf(basic_syncbuf&& other);
     ^
p1572.cpp:67:36: error: use of undeclared identifier 'other'
     basic_syncbuf(basic_syncbuf&& other);
                                   ^
p1572.cpp:70:2: error: identifier 'basic_syncbuf' after '~' in destructor name does not name a type
~basic_syncbuf();
 ^
p1572.cpp:35:9: note: non-type declaration found by destructor name lookup
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:74:1: error: use of class template 'basic_syncbuf' requires template arguments
basic_syncbuf& operator=(basic_syncbuf&& rhs);
^
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
12 warnings and 20 errors generated.
$ clang++ p1572.cpp -std=2b -o p1572l -I. -Wall
p1572.cpp:34:40: error: template parameter redefines default argument
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                       ^
p1572.cpp:17:42: note: previous default template argument defined here
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                         ^
p1572.cpp:34:78: error: template parameter redefines default argument
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                             ^
p1572.cpp:17:80: note: previous default template argument defined here
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                                                               ^
p1572.cpp:45:30: error: anonymous bit-field cannot have a default member initializer
    : basic_syncbuf(nullptr) {}
                             ^
p1572.cpp:45:5: error: C++ requires a type specifier for all declarations
    : basic_syncbuf(nullptr) {}
    ^
p1572.cpp:62:18: error: unknown type name 'streambuf_type'
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
                 ^
p1572.cpp:62:46: error: unknown type name 'Allocator'
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
                                             ^
p1572.cpp:62:4: error: deduction guide must be declared in the same scope as template 'std::basic_syncbuf'
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
   ^
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:62:4: error: deduction guide declaration without trailing return type
   basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
   ^
p1572.cpp:67:20: error: use of class template 'basic_syncbuf' requires template arguments; argument deduction not allowed in function prototype
     basic_syncbuf(basic_syncbuf&& other);
                   ^~~~~~~~~~~~~
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:67:6: error: deduction guide must be declared in the same scope as template 'std::basic_syncbuf'
     basic_syncbuf(basic_syncbuf&& other);
     ^
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:67:6: error: deduction guide declaration without trailing return type
     basic_syncbuf(basic_syncbuf&& other);
     ^
p1572.cpp:70:2: error: identifier 'basic_syncbuf' after '~' in destructor name does not name a type
~basic_syncbuf();
 ^
p1572.cpp:35:9: note: non-type declaration found by destructor name lookup
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:74:26: error: use of class template 'basic_syncbuf' requires template arguments; argument deduction not allowed in function prototype
basic_syncbuf& operator=(basic_syncbuf&& rhs);
                         ^~~~~~~~~~~~~
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:74:1: error: use of class template 'basic_syncbuf' requires template arguments; argument deduction not allowed in function return type
basic_syncbuf& operator=(basic_syncbuf&& rhs);
^~~~~~~~~~~~~
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:79:11: error: use of class template 'basic_syncbuf' requires template arguments; argument deduction not allowed in function prototype
void swap(basic_syncbuf& other);
          ^~~~~~~~~~~~~
p1572.cpp:35:9: note: template is declared here
  class basic_syncbuf : public basic_streambuf<charT, traits> {
        ^
p1572.cpp:93:1: error: unknown type name 'allocator_type'
allocator_type get_allocator() const noexcept;
^
p1572.cpp:93:32: error: non-member function cannot have 'const' qualifier
allocator_type get_allocator() const noexcept;
                               ^~~~~~
p1572.cpp:98:12: error: 'override' specifier is not allowed outside a class definition
int sync() override;
           ^~~~~~~~
p1572.cpp:109:40: error: template parameter redefines default argument
  template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                       ^
p1572.cpp:25:42: note: previous default template argument defined here
    template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
                                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p1572.cpp -std=03 -o p1572g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1572.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 \
      |  ^~~~~
p1572.cpp:45:21: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++11-compat]
   45 |     : basic_syncbuf(nullptr) {}
      |                     ^~~~~~~
p1572.cpp:52:37: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
   52 | streambuf_type* get_wrapped() const noexcept; allocator_type get_allocator() const noexcept; void set_emit_on_sync(bool) noexcept;
      |                                     ^~~~~~~~
p1572.cpp:17:95: error: spurious '>>', use '>' to terminate a template argument list
   17 |     template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                                               ^~
p1572.cpp:17:80: error: two or more data types in declaration of 'type name'
   17 |     template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                                ^~~~~~~~~~~~~~~~~
p1572.cpp:18:26: error: expected '>' before ';' token
   18 |       class basic_syncbuf;
      |                          ^
p1572.cpp:18:26: error: expected unqualified-id before ';' token
p1572.cpp:21:17: error: 'std::basic_syncbuf' is not a template
   21 |       void swap(basic_syncbuf<charT, traits, Allocator>&,
      |                 ^~~~~~~~~~~~~
p1572.cpp:22:17: error: 'std::basic_syncbuf' is not a template
   22 |                 basic_syncbuf<charT, traits, Allocator>&);
      |                 ^~~~~~~~~~~~~
p1572.cpp:23:11: error: expected nested-name-specifier before 'syncbuf'
   23 |     using syncbuf = basic_syncbuf<char>;
      |           ^~~~~~~
p1572.cpp:24:11: error: expected nested-name-specifier before 'wsyncbuf'
   24 |     using wsyncbuf = basic_syncbuf<wchar_t>;
      |           ^~~~~~~~
p1572.cpp:25:95: error: spurious '>>', use '>' to terminate a template argument list
   25 |     template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                                               ^~
p1572.cpp:25:80: error: two or more data types in declaration of 'type name'
   25 |     template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                                ^~~~~~~~~~~~~~~~~
p1572.cpp:26:30: error: expected '>' before ';' token
   26 |       class basic_osyncstream;
      |                              ^
p1572.cpp:26:30: error: expected unqualified-id before ';' token
p1572.cpp:27:11: error: expected nested-name-specifier before 'osyncstream'
   27 |     using osyncstream = basic_osyncstream<char>;
      |           ^~~~~~~~~~~
p1572.cpp:28:11: error: expected nested-name-specifier before 'wosyncstream'
   28 |     using wosyncstream = basic_osyncstream<wchar_t>;
      |           ^~~~~~~~~~~~
p1572.cpp:34:93: error: spurious '>>', use '>' to terminate a template argument list
   34 |   template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                                             ^~
p1572.cpp:35:63: error: definition of 'class std::basic_syncbuf' inside template parameter list
   35 |   class basic_syncbuf : public basic_streambuf<charT, traits> {
      |                                                               ^
p1572.cpp:34:78: error: two or more data types in declaration of 'type name'
   34 |   template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                              ^~~~~~~~~~~~~~~~~
p1572.cpp:58:2: error: expected '>' before ';' token
   58 | }; }
      |  ^
p1572.cpp:58:2: error: expected unqualified-id before ';' token
p1572.cpp:62:32: error: expected ')' before '*' token
   62 |    basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
      |                 ~              ^
      |                                )
p1572.cpp:67:33: error: expected ')' before '&&' token
   67 |      basic_syncbuf(basic_syncbuf&& other);
      |                   ~             ^~
      |                                 )
p1572.cpp:70:17: error: expected constructor, destructor, or type conversion before ';' token
   70 | ~basic_syncbuf();
      |                 ^
p1572.cpp:74:39: error: expected ',' or '...' before '&&' token
   74 | basic_syncbuf& operator=(basic_syncbuf&& rhs);
      |                                       ^~
p1572.cpp:74:16: error: 'std::basic_syncbuf& operator=(std::basic_syncbuf)' must be a non-static member function
   74 | basic_syncbuf& operator=(basic_syncbuf&& rhs);
      |                ^~~~~~~~
p1572.cpp:93:1: error: 'allocator_type' does not name a type
   93 | allocator_type get_allocator() const noexcept;
      | ^~~~~~~~~~~~~~
p1572.cpp:95:31: error: expected initializer before 'noexcept'
   95 | void set_emit_on_sync(bool b) noexcept;
      |                               ^~~~~~~~
p1572.cpp:98:10: warning: override controls (override/final) only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
   98 | int sync() override;
      |          ^
p1572.cpp:98:12: error: virt-specifiers in 'sync' not allowed outside a class definition
   98 | int sync() override;
      |            ^~~~~~~~
p1572.cpp:103:13: error: 'std::basic_syncbuf' is not a template
  103 |   void swap(basic_syncbuf<charT, traits, Allocator>& a,
      |             ^~~~~~~~~~~~~
p1572.cpp:104:13: error: 'std::basic_syncbuf' is not a template
  104 |             basic_syncbuf<charT, traits, Allocator>& b);
      |             ^~~~~~~~~~~~~
p1572.cpp:109:93: error: spurious '>>', use '>' to terminate a template argument list
  109 |   template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                                             ^~
p1572.cpp:110:65: error: definition of 'class std::basic_osyncstream' inside template parameter list
  110 |   class basic_osyncstream : public basic_ostream<charT, traits> {
      |                                                                 ^
p1572.cpp:109:78: error: two or more data types in declaration of 'type name'
  109 |   template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                                                                              ^~~~~~~~~~~~~~~~~
p1572.cpp:136:2: error: expected '>' before ';' token
  136 | }; }
      |  ^
p1572.cpp:136:2: error: expected unqualified-id before ';' token
p1572.cpp: In function 'void sample3()':
p1572.cpp:143:1: error: 'osyncstream' was not declared in this scope
  143 | osyncstream bout(cout);
      | ^~~~~~~~~~~
p1572.cpp:144:1: error: 'bout' was not declared in this scope
  144 | bout << "Hello, ";
      | ^~~~
p1572.cpp:152:22: error: 'streambuf_type' was not declared in this scope
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                      ^~~~~~~~~~~~~~
p1572.cpp:152:38: error: 'buf' was not declared in this scope
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                                      ^~~
p1572.cpp:152:69: error: invalid use of incomplete type 'class std::basic_osyncstream'
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                                                                     ^
p1572.cpp:110:9: note: forward declaration of 'class std::basic_osyncstream'
  110 |   class basic_osyncstream : public basic_ostream<charT, traits> {
      |         ^~~~~~~~~~~~~~~~~
p1572.cpp:152:21: error: expected primary-expression before '(' token
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                     ^
p1572.cpp:152:43: error: expected primary-expression before 'const'
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                                           ^~~~~
p1572.cpp: At global scope:
p1572.cpp:158:6: error: ambiguating new declaration of 'void emit()'
  158 | void emit();
      |      ^~~~
p1572.cpp:83:6: note: old declaration 'bool emit()'
   83 | bool emit();
      |      ^~~~
p1572.cpp:161:1: error: 'bout' does not name a type
  161 | bout << "Greetings." << '\n';
      | ^~~~
p1572.cpp:163:1: error: 'osyncstream' does not name a type
  163 | osyncstream bout(cout);
      | ^~~~~~~~~~~
p1572.cpp:164:1: error: 'bout' does not name a type
  164 | bout << "Hello," << '\n';
      | ^~~~
p1572.cpp:165:1: error: 'bout' does not name a type
  165 | bout.emit();
      | ^~~~
p1572.cpp:166:1: error: 'bout' does not name a type
  166 | bout << "World!" << endl;
      | ^~~~
p1572.cpp:167:1: error: 'bout' does not name a type
  167 | bout.emit();
      | ^~~~
p1572.cpp: In function 'void sample()':
p1572.cpp:175:5: error: 'osyncstream' was not declared in this scope
  175 |     osyncstream bout(cout);
      |     ^~~~~~~~~~~
p1572.cpp:176:5: error: 'bout' was not declared in this scope
  176 |     bout << "Hello, " << "World!" << '\n';
      |     ^~~~
p1572.cpp: At global scope:
p1572.cpp:182:1: error: 'streambuf_type' does not name a type
  182 | streambuf_type* get_wrapped() const noexcept;
      | ^~~~~~~~~~~~~~
p1572.cpp: In function 'void sample2()':
p1572.cpp:186:10: error: 'osyncstream' was not declared in this scope
  186 |          osyncstream bout1(cout);
      |          ^~~~~~~~~~~
p1572.cpp:187:10: error: 'bout1' was not declared in this scope
  187 |          bout1 << "Hello, ";
      |          ^~~~~

$ g++ p1572.cpp -std=2b -o p1572g -I. -Wall
p1572.cpp:34:25: error: redefinition of default argument for 'class traits'
   34 |   template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                         ^~~~~
p1572.cpp:17:27: note: original definition appeared here
   17 |     template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                           ^~~~~
p1572.cpp:62:32: error: expected ')' before '*' token
   62 |    basic_syncbuf(streambuf_type* obuf, const Allocator& allocator);
      |                 ~              ^
      |                                )
p1572.cpp:67:20: error: template placeholder type 'basic_syncbuf<...auto...>' must be followed by a simple declarator-id
   67 |      basic_syncbuf(basic_syncbuf&& other);
      |                    ^~~~~~~~~~~~~
p1572.cpp:18:13: note: 'template<class charT, class traits, class Allocator> class std::basic_syncbuf' declared here
   18 |       class basic_syncbuf;
      |             ^~~~~~~~~~~~~
p1572.cpp:67:6: error: deduction guide for 'std::basic_syncbuf<charT, traits, Allocator>' must have trailing return type
   67 |      basic_syncbuf(basic_syncbuf&& other);
      |      ^~~~~~~~~~~~~
p1572.cpp:18:13: note: 'template<class charT, class traits, class Allocator> class std::basic_syncbuf' declared here
   18 |       class basic_syncbuf;
      |             ^~~~~~~~~~~~~
p1572.cpp:70:15: error: expected class-name before '(' token
   70 | ~basic_syncbuf();
      |               ^
p1572.cpp:74:26: error: template placeholder type 'basic_syncbuf<...auto...>' must be followed by a simple declarator-id
   74 | basic_syncbuf& operator=(basic_syncbuf&& rhs);
      |                          ^~~~~~~~~~~~~
p1572.cpp:18:13: note: 'template<class charT, class traits, class Allocator> class std::basic_syncbuf' declared here
   18 |       class basic_syncbuf;
      |             ^~~~~~~~~~~~~
p1572.cpp:74:1: error: deduced class type 'basic_syncbuf' in function return type
   74 | basic_syncbuf& operator=(basic_syncbuf&& rhs);
      | ^~~~~~~~~~~~~
p1572.cpp:18:13: note: 'template<class charT, class traits, class Allocator> class std::basic_syncbuf' declared here
   18 |       class basic_syncbuf;
      |             ^~~~~~~~~~~~~
p1572.cpp:79:11: error: template placeholder type 'basic_syncbuf<...auto...>' must be followed by a simple declarator-id
   79 | void swap(basic_syncbuf& other);
      |           ^~~~~~~~~~~~~
p1572.cpp:18:13: note: 'template<class charT, class traits, class Allocator> class std::basic_syncbuf' declared here
   18 |       class basic_syncbuf;
      |             ^~~~~~~~~~~~~
p1572.cpp:93:1: error: 'allocator_type' does not name a type
   93 | allocator_type get_allocator() const noexcept;
      | ^~~~~~~~~~~~~~
p1572.cpp:98:12: error: virt-specifiers in 'sync' not allowed outside a class definition
   98 | int sync() override;
      |            ^~~~~~~~
p1572.cpp:98:5: error: ambiguating new declaration of 'int sync()'
   98 | int sync() override;
      |     ^~~~
In file included from /usr/local/include/c++/12.1.0/bits/atomic_wait.h:44,
                 from /usr/local/include/c++/12.1.0/bits/atomic_base.h:41,
                 from /usr/local/include/c++/12.1.0/atomic:41,
                 from N4910.h:11,
                 from p1572.cpp:10:
/usr/include/unistd.h:970:13: note: old declaration 'void sync()'
  970 | extern void sync (void) __THROW;
      |             ^~~~
p1572.cpp:109:25: error: redefinition of default argument for 'class traits'
  109 |   template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                         ^~~~~
p1572.cpp:25:27: note: original definition appeared here
   25 |     template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>>
      |                           ^~~~~
p1572.cpp: In function 'void sample3()':
p1572.cpp:143:22: error: variable 'std::osyncstream bout' has initializer but incomplete type
  143 | osyncstream bout(cout);
      |                      ^
p1572.cpp:149:17: error: invalid use of incomplete type 'using osyncstream = class std::basic_osyncstream<char>' {aka 'class std::basic_osyncstream<char>'}
  149 | osyncstream(cout) << "Hello, " << "World!" << '\n';
      |                 ^
p1572.cpp:26:13: note: declaration of 'using osyncstream = class std::basic_osyncstream<char>' {aka 'class std::basic_osyncstream<char>'}
   26 |       class basic_osyncstream;
      |             ^~~~~~~~~~~~~~~~~
p1572.cpp:152:22: error: 'streambuf_type' was not declared in this scope
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                      ^~~~~~~~~~~~~~
p1572.cpp:152:38: error: 'buf' was not declared in this scope
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                                      ^~~
p1572.cpp:152:21: error: missing template arguments before '(' token
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                     ^
p1572.cpp:152:43: error: expected primary-expression before 'const'
  152 |    basic_osyncstream(streambuf_type* buf, const Allocator& allocator);
      |                                           ^~~~~
p1572.cpp: At global scope:
p1572.cpp:158:6: error: ambiguating new declaration of 'void emit()'
  158 | void emit();
      |      ^~~~
p1572.cpp:83:6: note: old declaration 'bool emit()'
   83 | bool emit();
      |      ^~~~
p1572.cpp:161:1: error: 'bout' does not name a type
  161 | bout << "Greetings." << '\n';
      | ^~~~
p1572.cpp:163:22: error: variable 'std::osyncstream bout' has initializer but incomplete type
  163 | osyncstream bout(cout);
      |                      ^
p1572.cpp:164:1: error: 'bout' does not name a type
  164 | bout << "Hello," << '\n';
      | ^~~~
p1572.cpp:165:1: error: 'bout' does not name a type
  165 | bout.emit();
      | ^~~~
p1572.cpp:166:1: error: 'bout' does not name a type
  166 | bout << "World!" << endl;
      | ^~~~
p1572.cpp:167:1: error: 'bout' does not name a type
  167 | bout.emit();
      | ^~~~
p1572.cpp: In function 'void sample()':
p1572.cpp:175:26: error: variable 'std::osyncstream bout' has initializer but incomplete type
  175 |     osyncstream bout(cout);
      |                          ^
p1572.cpp: At global scope:
p1572.cpp:182:1: error: 'streambuf_type' does not name a type
  182 | streambuf_type* get_wrapped() const noexcept;
      | ^~~~~~~~~~~~~~
p1572.cpp: In function 'void sample2()':
p1572.cpp:186:32: error: variable 'std::osyncstream bout1' has initializer but incomplete type
  186 |          osyncstream bout1(cout);
      |                                ^
p1572.cpp:189:43: error: invalid use of incomplete type 'using osyncstream = class std::basic_osyncstream<char>' {aka 'class std::basic_osyncstream<char>'}
  189 |            osyncstream(bout1.get_wrapped()) << "Goodbye, " << "Planet!" << '\n';
      |                                           ^
p1572.cpp:26:13: note: declaration of 'using osyncstream = class std::basic_osyncstream<char>' {aka 'class std::basic_osyncstream<char>'}
   26 |       class basic_osyncstream;
      |             ^~~~~~~~~~~~~~~~~
```

# 検討事項(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 箱庭　
箱庭もくもく会 #10 日時：2022/09/14(水) 17:30-19:30
https://hakoniwa.connpass.com/event/258129/

箱庭では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

<この項は書きかけです。順次追記します。>
This article is not completed. I will add some words and/or centences in order.
Este artículo no está completo. Agregaré algunas palabras en orden.

## 知人資料
' @kazuo_reve 私が効果を確認した「小川メソッド」
https://qiita.com/kazuo_reve/items/a3ea1d9171deeccc04da

' @kazuo_reve 新人の方によく展開している有益な情報
https://qiita.com/kazuo_reve/items/d1a3f0ee48e24bba38f1

' @kazuo_reve Vモデルについて勘違いしていたと思ったこと
https://qiita.com/kazuo_reve/items/46fddb094563bd9b2e1e

## 自己記事一覧
Qiitaで逆リンクを表示しなくなったような気がする。時々、スマフォで表示するとあらわっることがあり、完全に削除したのではなさそう。

４月以降、せっせとリンクリストを作り、統計を取って確率を説明しようとしている。
2025年２月末を目標にしている。

一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39

仮説（0）一覧（目標100現在40）
https://qiita.com/kaizen_nagoya/items/f000506fe1837b3590df

Qiita(0)Qiita関連記事一覧（自分）
https://qiita.com/kaizen_nagoya/items/58db5fbf036b28e9dfa6

Error一覧 error(0)
https://qiita.com/kaizen_nagoya/items/48b6cbc8d68eae2c42b8

C++ Support(0)　
https://qiita.com/kaizen_nagoya/items/8720d26f762369a80514

Coding(0) Rules, C, Secure, MISRA and so on
https://qiita.com/kaizen_nagoya/items/400725644a8a0e90fbb0

Ethernet 記事一覧　Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

Wireshark 一覧 wireshark(0)、Ethernet(48) 
https://qiita.com/kaizen_nagoya/items/fbed841f61875c4731d0

線網（Wi-Fi）空中線(antenna)(0) 記事一覧(118/300目標)
https://qiita.com/kaizen_nagoya/items/5e5464ac2b24bd4cd001

なぜdockerで機械学習するか 書籍・ソース一覧作成中 (目標100)
https://qiita.com/kaizen_nagoya/items/ddd12477544bf5ba85e2

プログラムちょい替え（0）一覧:4件
https://qiita.com/kaizen_nagoya/items/296d87ef4bfd516bc394

言語処理100本ノックをdockerで。python覚えるのに最適。:10+12
https://qiita.com/kaizen_nagoya/items/7e7eb7c543e0c18438c4

Python(0)記事をまとめたい。
https://qiita.com/kaizen_nagoya/items/088c57d70ab6904ebb53

安全（0）安全工学シンポジウムに向けて: 21
https://qiita.com/kaizen_nagoya/items/c5d78f3def8195cb2409

プログラマによる、プログラマのための、統計(0)と確率のプログラミングとその後
https://qiita.com/kaizen_nagoya/items/6e9897eb641268766909

転職(0)一覧
https://qiita.com/kaizen_nagoya/items/f77520d378d33451d6fe

技術士(0)一覧
https://qiita.com/kaizen_nagoya/items/ce4ccf4eb9c5600b89ea

Reserchmap(0) 一覧
https://qiita.com/kaizen_nagoya/items/506c79e562f406c4257e

物理記事　上位100
https://qiita.com/kaizen_nagoya/items/66e90fe31fbe3facc6ff

量子(0) 計算機, 量子力学 
https://qiita.com/kaizen_nagoya/items/1cd954cb0eed92879fd4

数学関連記事１００
https://qiita.com/kaizen_nagoya/items/d8dadb49a6397e854c6d

coq(0) 一覧
https://qiita.com/kaizen_nagoya/items/d22f9995cf2173bc3b13

統計(0)一覧
https://qiita.com/kaizen_nagoya/items/80d3b221807e53e88aba

図(0) state, sequence and timing. UML and お絵描き 
https://qiita.com/kaizen_nagoya/items/60440a882146aeee9e8f

色(0) 記事100書く切り口 
https://qiita.com/kaizen_nagoya/items/22331c0335ed34326b9b

品質一覧 
https://qiita.com/kaizen_nagoya/items/2b99b8e9db6d94b2e971

言語・文学記事　１００
https://qiita.com/kaizen_nagoya/items/42d58d5ef7fb53c407d6

医工連携関連記事一覧
https://qiita.com/kaizen_nagoya/items/6ab51c12ba51bc260a82

水の資料集(0)　方針と成果
https://qiita.com/kaizen_nagoya/items/f5dbb30087ea732b52aa

自動車　記事　１００
https://qiita.com/kaizen_nagoya/items/f7f0b9ab36569ad409c5

通信記事１００
https://qiita.com/kaizen_nagoya/items/1d67de5e1cd207b05ef7

日本語（０）一欄
https://qiita.com/kaizen_nagoya/items/7498dcfa3a9ba7fd1e68

英語(0) 一覧
https://qiita.com/kaizen_nagoya/items/680e3f5cbf9430486c7d

音楽　一覧(0) 
https://qiita.com/kaizen_nagoya/items/b6e5f42bbfe3bbe40f5d

「@kazuo_reve 新人の方によく展開している有益な情報」確認一覧 
https://qiita.com/kaizen_nagoya/items/b9380888d1e5a042646b

鉄道（０）鉄道のシステム考察はてっちゃんがてつだってくれる
https://qiita.com/kaizen_nagoya/items/faa4ea03d91d901a618a

OSEK OS設計の基礎　OSEK(100)
https://qiita.com/kaizen_nagoya/items/7528a22a14242d2d58a3

coding (101) 一覧を作成し始めた。omake:最近のQiitaで表示しない5つの事象
https://qiita.com/kaizen_nagoya/items/20667f09f19598aedb68

官公庁・学校・公的団体（NPOを含む）システムの課題、官（０）
https://qiita.com/kaizen_nagoya/items/04ee6eaf7ec13d3af4c3

「はじめての」シリーズ　 ベクタージャパン　
https://qiita.com/kaizen_nagoya/items/2e41634f6e21a3cf74eb

AUTOSAR(0)Qiita記事一覧, OSEK(75)
https://qiita.com/kaizen_nagoya/items/89c07961b59a8754c869

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

LaTeX(0) 一覧　
https://qiita.com/kaizen_nagoya/items/e3f7dafacab58c499792

自動制御、制御工学一覧（０）
https://qiita.com/kaizen_nagoya/items/7767a4e19a6ae1479e6b

Rust(0) 一覧　
https://qiita.com/kaizen_nagoya/items/5e8bb080ba6ca0281927

programの本質は計画だ。programは設計だ。
https://qiita.com/kaizen_nagoya/items/c8545a769c246a458c27

登壇直後版 色使い(JIS安全色) Qiita Engineer Festa 2023〜私しか得しないニッチな技術でLT〜 スライド編 0.15
https://qiita.com/kaizen_nagoya/items/f0d3070d839f4f735b2b

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

逆も真：社会人が最初に確かめるとよいこと。OSEK(69)、Ethernet(59)
https://qiita.com/kaizen_nagoya/items/39afe4a728a31b903ddc

統計の嘘。仮説（127）
https://qiita.com/kaizen_nagoya/items/63b48ecf258a3471c51b

自分の言葉だけで論理展開できるのが天才なら、文章の引用だけで論理展開できるのが秀才だ。仮説（136）
https://qiita.com/kaizen_nagoya/items/97cf07b9e24f860624dd

参考文献駆動執筆(references driven writing)・デンソークリエイト編
https://qiita.com/kaizen_nagoya/items/b27b3f58b8bf265a5cd1

「何を」よりも「誰を」。１０年後のために今見習いたい人たち
https://qiita.com/kaizen_nagoya/items/8045978b16eb49d572b2

Qiitaの記事に３段階または５段階で到達するための方法
https://qiita.com/kaizen_nagoya/items/6e9298296852325adc5e

出力(output)と呼ばないで。これは状態(state)です。
https://qiita.com/kaizen_nagoya/items/80b8b5913b2748867840

祝休日・謹賀新年 2025年の目標
https://qiita.com/kaizen_nagoya/items/dfa34827932f99c59bbc

Qiita 1年間をまとめた「振り返りページ」＠2024
https://qiita.com/kaizen_nagoya/items/ed6be239119c99b15828

2024 参加・主催Calendarと投稿記事一覧 Qiita(248)
https://qiita.com/kaizen_nagoya/items/d80b8fbac2496df7827f

主催Calendar2024分析 Qiita(254)
https://qiita.com/kaizen_nagoya/items/15807336d583076f70bc

Calendar 統計
https://qiita.com/kaizen_nagoya/items/e315558dcea8ee3fe43e

LLM 関連 Calendar 2024 
https://qiita.com/kaizen_nagoya/items/c36033cf66862d5496fa

Large Language Model Related Calendar 
https://qiita.com/kaizen_nagoya/items/3beb0bc3fb71e3ae6d66

博士論文 Calendar 2024 を開催します。 
https://qiita.com/kaizen_nagoya/items/51601357efbcaf1057d0

博士論文(0)関連記事一覧
https://qiita.com/kaizen_nagoya/items/8f223a760e607b705e78

coding (101) 一覧を作成し始めた。omake:最近のQiitaで表示しない5つの事象
https://qiita.com/kaizen_nagoya/items/20667f09f19598aedb68

あなたは「勘違いまとめ」から、勘違いだと言っていることが勘違いだといくつ見つけられますか。人間の間違い(human error(125))の種類と対策
https://qiita.com/kaizen_nagoya/items/ae391b77fffb098b8fb4

プログラマの「プログラムが書ける」思い込みは強みだ。３つの理由。仮説（168）統計と確率(17) , OSEK(79)
https://qiita.com/kaizen_nagoya/items/bc5dd86e414de402ec29

出力(output)と呼ばないで。これは状態(state)です。
https://qiita.com/kaizen_nagoya/items/80b8b5913b2748867840

これからの情報伝達手段の在り方について考えてみよう。炎上と便乗。
https://qiita.com/kaizen_nagoya/items/71a09077ac195214f0db

ISO/IEC JTC1 SC7 Software and System Engineering
https://qiita.com/kaizen_nagoya/items/48b43f0f6976a078d907

アクセシビリティの知見を発信しよう！（再び）
https://qiita.com/kaizen_nagoya/items/03457eb9ee74105ee618

統計論及確率論輪講（再び）
https://qiita.com/kaizen_nagoya/items/590874ccfca988e85ea3

読者の心をグッと惹き寄せる7つの魔法
https://qiita.com/kaizen_nagoya/items/b1b5e89bd5c0a211d862

「@kazuo_reve 新人の方によく展開している有益な情報」確認一覧
https://qiita.com/kaizen_nagoya/items/b9380888d1e5a042646b

ソースコードで議論しよう。日本語で議論するの止めましょう（あるプログラミング技術の議論報告）
https://qiita.com/kaizen_nagoya/items/8b9811c80f3338c6c0b0

脳内コンパイラの3つの危険
https://qiita.com/kaizen_nagoya/items/7025cf2d7bd9f276e382

心理学の本を読むよりはコンパイラ書いた方がよくね。仮説（34）
https://qiita.com/kaizen_nagoya/items/fa715732cc148e48880e

NASAを超えるつもりがあれば読んでください。
https://qiita.com/kaizen_nagoya/items/e81669f9cb53109157f6

データサイエンティストの気づき!「勉強して仕事に役立てない人。大嫌い!!」『それ自分かも?』ってなった!!! 
https://qiita.com/kaizen_nagoya/items/d85830d58d8dd7f71d07

「ぼくの好きな先生」「人がやらないことをやれ」プログラマになるまで。仮説（37）　
https://qiita.com/kaizen_nagoya/items/53e4bded9fe5f724b3c4

なぜ経済学徒を辞め、計算機屋になったか（経済学部入学前・入学後・卒業後対応） 転職(1)  
https://qiita.com/kaizen_nagoya/items/06335a1d24c099733f64    

プログラミング言語教育のXYZ。 仮説（52） 
https://qiita.com/kaizen_nagoya/items/1950c5810fb5c0b07be4

【24卒向け】9ヶ月後に年収１０００万円を目指す。二つの関門と三つの道。
https://qiita.com/kaizen_nagoya/items/fb5bff147193f726ad25

「【25卒向け】Qiita Career Meetup for STUDENT」予習の勧め
https://qiita.com/kaizen_nagoya/items/00eadb8a6e738cb6336f

大学入試不合格でも筆記試験のない大学に入って卒業できる。卒業しなくても博士になれる。
https://qiita.com/kaizen_nagoya/items/74adec99f396d64b5fd5

全世界の不登校の子供たち「博士論文」を書こう。世界子供博士論文遠隔実践中心 安全(99)
https://qiita.com/kaizen_nagoya/items/912d69032c012bcc84f2

日本のプログラマが世界で戦える16分野。仮説(53),統計と確率(25) 転職(32)、Ethernet(58)
https://qiita.com/kaizen_nagoya/items/a7e634a996cdd02bc53b

小川メソッド　覚え（書きかけ）
https://qiita.com/kaizen_nagoya/items/3593d72eca551742df68

DoCAP（ドゥーキャップ）って何ですか？
https://qiita.com/kaizen_nagoya/items/47e0e6509ab792c43327

views 20,000越え自己記事一覧
https://qiita.com/kaizen_nagoya/items/58e8bd6450957cdecd81

Views１万越え、もうすぐ１万記事一覧 最近いいねをいただいた213記事
https://qiita.com/kaizen_nagoya/items/d2b805717a92459ce853

amazon 殿堂入りNo1レビュアになるまで。仮説(102)
https://qiita.com/kaizen_nagoya/items/83259d18921ce75a91f4

100以上いいねをいただいた記事16選
https://qiita.com/kaizen_nagoya/items/f8d958d9084ffbd15d2a

水道局10年(1976,4-1986,3)を振り返る
https://qiita.com/kaizen_nagoya/items/707fcf6fae230dd349bf

小川清最終講義、最終講義（再）計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53

＜この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。＞
This article is an individual impression based on my individual experience. It has nothing to do with the organization or business to which I currently belong.
Este artículo es una impresión personal basada en mi experiencia personal. No tiene nada que ver con la organización o empresa a la que pertenezco actualmente.
### 文書履歴(document history)
ver. 0.01 初稿 　20220902
### 最後までおよみいただきありがとうございました。
いいね　💚、フォローをお願いします。
#### Thank you very much for reading to the last sentence.
Please press the like icon 💚　and follow me for your happy life.
#### Muchas gracias por leer hasta la última oración.
Por favor, haz clic en el ícono Me gusta 💚 y sígueme para tener una vida feliz.