22.12 Execution policies [execpol] C++N4910:2022 (630) p766.cpp

# はじめに(Introduction)

N4910  Working Draft, Standard for Programming Language C++

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

n4910は、ISO/IEC JTC1 SC22 WG21の作業原案(Working Draft)です。
公式のISO/IEC 14882原本ではありません。
ISO/IEC JTC1 SC22 WG21では、可能な限り作業文書を公開し、幅広い意見を求めています。
一連の記事はコード断片をコンパイルできる形にする方法を検討してコンパイル、リンク、実行して、規格案の原文と処理系(g++, Clang++)との違いを確認し、技術内容を検討し、ISO/IEC JTC1 SC22 WG21にフィードバックするために用います。
また、CERT C++, MISRA C++等のコーディング標準のコード断片をコンパイルする際の参考にさせていただこうと考えています。CERT C++, MISRA C++が標準化の動きとの時間的なずれがあれば確認できれば幸いです。また、boostライブラリとの関連、Linux OS, TOPPERSカーネル、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
> Debian clang version 14.0.5-++20220610033153+c12386ae247c-1~exp1~20220610153237.151
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.

# 22.12 Execution policies [execpol] C++N4910:2022 (630) p766.cpp

## 算譜(source code)

```c++:p766.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 = "22.12 Execution policies [execpol] C++N4910:2022 (630) p766.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;

// 22.12.1 In general [execpol.general]
// Subclause 22.12 describes classes that are execution policy types. An object of an execution policy type indicates the kinds of parallelism allowed in the execution of an algorithm and expresses the consequent requirements on the element access functions.
// [Example 1:
using namespace std;
vector<int> v = /* ... */;
// standard sequential sort
sort(v.begin(), v.end());
// explicitly sequential sort
sort(execution::seq, v.begin(), v.end());
// permitting parallel execution
sort(execution::par, v.begin(), v.end());
// permitting vectorization as well
sort(execution::par_unseq, v.begin(), v.end());
// [Note 1: Implementations can provide additional execution policies to those described in this standard as extensions to address parallel architectures that require idiosyncratic parameters for efficient execution.
// 22.12.2 Header <execution> synopsis [execution.syn]
namespace std {
// 22.12.3, execution policy type trait
template<class T> struct is_execution_policy;
template<class T> inline constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
}
namespace std::execution {
// 22.12.4, sequenced execution policy class sequenced_policy;
// 22.12.5, parallel execution policy class parallel_policy;
// 22.12.6, parallel and unsequenced execution policy class parallel_unsequenced_policy;
// 22.12.7, unsequenced execution policy class unsequenced_policy;
// 22.12.8, execution policy objects
inline constexpr sequenced_policy
inline constexpr parallel_policy
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified };
inline constexpr unsequenced_policy unseq{ unspecified };
}
seq{ unspecified };
par{ unspecified };
// The header <execution> declares global objects associated with each type of execution policy.
// 22.12.3 Execution policy type trait [execpol.type]
template<class T> struct is_execution_policy {
    see below
};
// is_execution_policy can be used to detect execution policies for the purpose of excluding function
//  The class unsequenced_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be vectorized, e.g., executed on a single thread using instructions that operate on multiple data items.
//  During the execution of a parallel algorithm with the execution::unsequenced_policy policy, if the invocation of an element access function exits via an exception, terminate is invoked (14.6.2). signatures from otherwise ambiguous overload resolution participation.
// is_execution_policy<T> is a Cpp17UnaryTypeTrait with a base characteristic of true_type if T is the type of a standard or implementation-defined execution policy, otherwise false_type.
// [Note 1: This provision reserves the privilege of creating non-standard execution policies to the library implementation.
// The behavior of a program that adds specializations for is_execution_policy is undefined.
// 22.12.4 Sequenced execution policy [execpol.seq]
class execution::sequenced_policy {
    unspecified
};
// The class execution::sequenced_policy is an execution policy type used as a unique type to disam- biguate parallel algorithm overloading and require that a parallel algorithm’s execution may not be parallelized.
// During the execution of a parallel algorithm with the execution::sequenced_policy policy, if the invocation of an element access function exits via an exception, terminate is invoked (14.6.2).
// 22.12.5 Parallel execution policy [execpol.par]
class execution::parallel_policy {
    unspecified
};
// The class execution::parallel_policy is an execution policy type used as a unique type to dis- ambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be parallelized.
// During the execution of a parallel algorithm with the execution::parallel_policy policy, if the invocation of an element access function exits via an exception, terminate is invoked (14.6.2).
// 22.12.6 Parallel and unsequenced execution policy [execpol.parunseq]
class execution::parallel_unsequenced_policy {
    unspecified
};
// The class execution::parallel_unsequenced_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be parallelized and vectorized.
// During the execution of a parallel algorithm with the execution::parallel_unsequenced_policy policy, if the invocation of an element access function exits via an exception, terminate is invoked (14.6.2).
// 22.12.7 Unsequenced execution policy [execpol.unseq]
class execution::unsequenced_policy {
    unspecified
};
// 22.12.8 Execution policy objects
inline constexpr execution::sequenced_policy
inline constexpr execution::parallel_policy
inline constexpr execution::parallel_unsequenced_policy execution::par_unseq{ unspecified };
inline constexpr execution::unsequenced_policy execution::unseq{ unspecified };
int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}
```

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

```ubuntu:bash
$ clang++ p766.cpp -std=03 -o p766l -I. -Wall
In file included from p766.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 \
 ^
p766.cpp:18:31: error: expected expression
     vector<int> v = /* ... */;
                              ^
p766.cpp:20:6: error: C++ requires a type specifier for all declarations
     sort(v.begin(), v.end());
     ^
p766.cpp:22:11: error: use of undeclared identifier 'execution'; did you mean 'exception'?
     sort(execution::seq, v.begin(), v.end());
          ^~~~~~~~~
          exception
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception.h:60:9: note: 'exception' declared here
  class exception
        ^
p766.cpp:22:6: error: C++ requires a type specifier for all declarations
     sort(execution::seq, v.begin(), v.end());
     ^
p766.cpp:22:22: error: no member named 'seq' in 'std::exception'
     sort(execution::seq, v.begin(), v.end());
          ~~~~~~~~~~~^
p766.cpp:24:11: error: use of undeclared identifier 'execution'; did you mean 'exception'?
     sort(execution::par, v.begin(), v.end());
          ^~~~~~~~~
          exception
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception.h:60:9: note: 'exception' declared here
  class exception
        ^
p766.cpp:24:6: error: C++ requires a type specifier for all declarations
     sort(execution::par, v.begin(), v.end());
     ^
p766.cpp:24:22: error: no member named 'par' in 'std::exception'
     sort(execution::par, v.begin(), v.end());
          ~~~~~~~~~~~^
p766.cpp:26:11: error: use of undeclared identifier 'execution'; did you mean 'exception'?
     sort(execution::par_unseq, v.begin(), v.end());
          ^~~~~~~~~
          exception
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/exception.h:60:9: note: 'exception' declared here
  class exception
        ^
p766.cpp:26:6: error: C++ requires a type specifier for all declarations
     sort(execution::par_unseq, v.begin(), v.end());
     ^
p766.cpp:26:22: error: no member named 'par_unseq' in 'std::exception'
     sort(execution::par_unseq, v.begin(), v.end());
          ~~~~~~~~~~~^
p766.cpp:32:26: error: unknown type name 'constexpr'
template<class T> inline constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
                         ^
p766.cpp:32:41: warning: variable templates are a C++14 extension [-Wc++14-extensions]
template<class T> inline constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
                                        ^
p766.cpp:32:19: warning: inline variables are a C++17 extension [-Wc++17-extensions]
template<class T> inline constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
                  ^
p766.cpp:34:19: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
     namespace std::execution {
                  ^~~~~~~~~~~
                   { namespace execution
p766.cpp:40:8: error: unknown type name 'constexpr'
inline constexpr sequenced_policy
       ^
p766.cpp:40:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr sequenced_policy
^
p766.cpp:40:34: error: expected ';' after top level declarator
inline constexpr sequenced_policy
                                 ^
                                 ;
p766.cpp:41:8: error: unknown type name 'constexpr'
inline constexpr parallel_policy
       ^
p766.cpp:41:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr parallel_policy
^
p766.cpp:41:33: error: expected ';' after top level declarator
inline constexpr parallel_policy
                                ^
                                ;
p766.cpp:42:8: error: unknown type name 'constexpr'
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
       ^
p766.cpp:42:1: warning: inline variables are a C++17 extension [-Wc++17-extensions]
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
^
p766.cpp:42:45: error: expected ';' after top level declarator
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
                                            ^
                                            ;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
$ clang++ p766.cpp -std=2b -o p766l -I. -Wall
p766.cpp:18:31: error: expected expression
     vector<int> v = /* ... */;
                              ^
p766.cpp:20:6: error: C++ requires a type specifier for all declarations
     sort(v.begin(), v.end());
     ^
p766.cpp:22:11: error: use of undeclared identifier 'execution'; did you mean '__pstl::execution'?
     sort(execution::seq, v.begin(), v.end());
          ^~~~~~~~~
          __pstl::execution
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/execution_defs.h:17:11: note: '__pstl::execution' declared here
namespace execution
          ^
p766.cpp:22:6: error: C++ requires a type specifier for all declarations
     sort(execution::seq, v.begin(), v.end());
     ^
p766.cpp:24:11: error: use of undeclared identifier 'execution'; did you mean '__pstl::execution'?
     sort(execution::par, v.begin(), v.end());
          ^~~~~~~~~
          __pstl::execution
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/execution_defs.h:17:11: note: '__pstl::execution' declared here
namespace execution
          ^
p766.cpp:24:6: error: C++ requires a type specifier for all declarations
     sort(execution::par, v.begin(), v.end());
     ^
p766.cpp:26:11: error: use of undeclared identifier 'execution'; did you mean '__pstl::execution'?
     sort(execution::par_unseq, v.begin(), v.end());
          ^~~~~~~~~
          __pstl::execution
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/execution_defs.h:17:11: note: '__pstl::execution' declared here
namespace execution
          ^
p766.cpp:26:6: error: C++ requires a type specifier for all declarations
     sort(execution::par_unseq, v.begin(), v.end());
     ^
p766.cpp:40:18: error: unknown type name 'sequenced_policy'; did you mean '__pstl::execution::sequenced_policy'?
inline constexpr sequenced_policy
                 ^~~~~~~~~~~~~~~~
                 __pstl::execution::sequenced_policy
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/execution_defs.h:23:7: note: '__pstl::execution::sequenced_policy' declared here
class sequenced_policy
      ^
p766.cpp:41:1: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier]
inline constexpr parallel_policy
^
p766.cpp:41:8: warning: duplicate 'constexpr' declaration specifier [-Wduplicate-decl-specifier]
inline constexpr parallel_policy
       ^~~~~~~~~~
p766.cpp:41:33: error: expected ';' after top level declarator
inline constexpr parallel_policy
                                ^
                                ;
p766.cpp:42:18: error: unknown type name 'parallel_unsequenced_policy'; did you mean '__pstl::execution::parallel_unsequenced_policy'?
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                 __pstl::execution::parallel_unsequenced_policy
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/execution_defs.h:67:7: note: '__pstl::execution::parallel_unsequenced_policy' declared here
class parallel_unsequenced_policy
      ^
p766.cpp:42:57: error: use of undeclared identifier 'unspecified'
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
                                                        ^
p766.cpp:42:89: error: unknown type name 'unsequenced_policy'; did you mean '__pstl::execution::unsequenced_policy'?
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
                                                                                        ^~~~~~~~~~~~~~~~~~
                                                                                        __pstl::execution::unsequenced_policy
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/pstl/execution_defs.h:88:7: note: '__pstl::execution::unsequenced_policy' declared here
class unsequenced_policy
      ^
p766.cpp:42:115: error: use of undeclared identifier 'unspecified'
inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
                                                                                                                  ^
p766.cpp:44:1: error: C++ requires a type specifier for all declarations
seq{ unspecified }; par{ unspecified };
^
p766.cpp:44:6: error: use of undeclared identifier 'unspecified'
seq{ unspecified }; par{ unspecified };
     ^
p766.cpp:44:21: error: C++ requires a type specifier for all declarations
seq{ unspecified }; par{ unspecified };
                    ^
p766.cpp:44:26: error: use of undeclared identifier 'unspecified'
seq{ unspecified }; par{ unspecified };
                         ^
p766.cpp:47:48: error: unknown type name 'see'
template<class T> struct is_execution_policy { see below };
                                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.

$ g++ p766.cpp -std=03 -o p766g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p766.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 \
      |  ^~~~~
p766.cpp:32:26: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
   32 | template<class T> inline constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
      |                          ^~~~~~~~~
p766.cpp:18:31: error: expected primary-expression before ';' token
   18 |      vector<int> v = /* ... */;
      |                               ^
p766.cpp:20:10: error: expected constructor, destructor, or type conversion before '(' token
   20 |      sort(v.begin(), v.end());
      |          ^
p766.cpp:22:10: error: expected constructor, destructor, or type conversion before '(' token
   22 |      sort(execution::seq, v.begin(), v.end());
      |          ^
p766.cpp:24:10: error: expected constructor, destructor, or type conversion before '(' token
   24 |      sort(execution::par, v.begin(), v.end());
      |          ^
p766.cpp:26:10: error: expected constructor, destructor, or type conversion before '(' token
   26 |      sort(execution::par_unseq, v.begin(), v.end());
      |          ^
p766.cpp:32:26: error: 'constexpr' does not name a type
   32 | template<class T> inline constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
      |                          ^~~~~~~~~
p766.cpp:32:26: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p766.cpp:40:8: error: 'constexpr' does not name a type
   40 | inline constexpr sequenced_policy
      |        ^~~~~~~~~
p766.cpp:40:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p766.cpp:42:79: error: 'constexpr' does not name a type
   42 | inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
      |                                                                               ^~~~~~~~~
p766.cpp:42:79: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p766.cpp:44:1: error: 'seq' does not name a type
   44 | seq{ unspecified }; par{ unspecified };
      | ^~~
p766.cpp:44:21: error: 'par' does not name a type
   44 | seq{ unspecified }; par{ unspecified };
      |                     ^~~
p766.cpp:47:48: error: 'see' does not name a type
   47 | template<class T> struct is_execution_policy { see below };
      |                                                ^~~
p766.cpp:55:35: error: qualified name does not name a class before '{' token
   55 | class execution::sequenced_policy { unspecified };
      |                                   ^
p766.cpp:59:34: error: qualified name does not name a class before '{' token
   59 | class execution::parallel_policy { unspecified };
      |                                  ^
p766.cpp:63:46: error: qualified name does not name a class before '{' token
   63 | class execution::parallel_unsequenced_policy { unspecified };
      |                                              ^
p766.cpp:67:37: error: qualified name does not name a class before '{' token
   67 | class execution::unsequenced_policy { unspecified };
      |                                     ^
p766.cpp:69:8: error: 'constexpr' does not name a type
   69 | inline constexpr execution::sequenced_policy
      |        ^~~~~~~~~
p766.cpp:69:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p766.cpp:71:101: error: 'constexpr' does not name a type
   71 | expr execution::parallel_unsequenced_policy execution::par_unseq{ unspecified }; inline constexpr execution::unsequenced_policy execution::unseq{ unspecified };
      |                                                                                         ^~~~~~~~~

p766.cpp:71:101: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'

$ g++ p766.cpp -std=2b -o p766g -I. -Wall
p766.cpp:18:31: error: expected primary-expression before ';' token
   18 |      vector<int> v = /* ... */;
      |                               ^
p766.cpp:20:10: error: expected constructor, destructor, or type conversion before '(' token
   20 |      sort(v.begin(), v.end());
      |          ^
p766.cpp:22:10: error: expected constructor, destructor, or type conversion before '(' token
   22 |      sort(execution::seq, v.begin(), v.end());
      |          ^
p766.cpp:24:10: error: expected constructor, destructor, or type conversion before '(' token
   24 |      sort(execution::par, v.begin(), v.end());
      |          ^
p766.cpp:26:10: error: expected constructor, destructor, or type conversion before '(' token
   26 |      sort(execution::par_unseq, v.begin(), v.end());
      |          ^
p766.cpp:40:18: error: 'sequenced_policy' does not name a type
   40 | inline constexpr sequenced_policy
      |                  ^~~~~~~~~~~~~~~~
p766.cpp:42:89: error: 'unsequenced_policy' does not name a type
   42 | inline constexpr parallel_unsequenced_policy par_unseq{ unspecified }; inline constexpr unsequenced_policy unseq{ unspecified };
      |                                                                                         ^~~~~~~~~~~~~~~~~~
p766.cpp:44:1: error: 'seq' does not name a type
   44 | seq{ unspecified }; par{ unspecified };
      | ^~~
p766.cpp:44:21: error: 'par' does not name a type
   44 | seq{ unspecified }; par{ unspecified };
      |                     ^~~
p766.cpp:47:48: error: 'see' does not name a type
   47 | template<class T> struct is_execution_policy { see below };
      |                                                ^~~
p766.cpp:55:35: error: qualified name does not name a class before '{' token
   55 | class execution::sequenced_policy { unspecified };
      |                                   ^
p766.cpp:59:34: error: qualified name does not name a class before '{' token
   59 | class execution::parallel_policy { unspecified };
      |                                  ^
p766.cpp:63:46: error: qualified name does not name a class before '{' token
   63 | class execution::parallel_unsequenced_policy { unspecified };
      |                                              ^
p766.cpp:67:37: error: qualified name does not name a class before '{' token
   67 | class execution::unsequenced_policy { unspecified };
      |                                     ^
p766.cpp:69:29: error: 'sequenced_policy' in namespace 'std::execution' does not name a type
   69 | inline constexpr execution::sequenced_policy
      |                             ^~~~~~~~~~~~~~~~
p766.cpp:71:122: error: 'unsequenced_policy' in namespace 'std::execution' does not name a type
   71 | lel_unsequenced_policy execution::par_unseq{ unspecified }; inline constexpr execution::unsequenced_policy execution::unseq{ unspecified };
      |                                                                                         ^~~~~~~~~~~~~~~~~~


```

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

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

# 参考資料(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/drafts/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

DoCAP（ドゥーキャップ）って何ですか？

https://qiita.com/kaizen_nagoya/items/47e0e6509ab792c43327

小川メソッド　覚え（書きかけ）

https://qiita.com/kaizen_nagoya/items/3593d72eca551742df68

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

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