0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

28.8 Numbers [numbers] C++N4910:2022 (671) p1354.cpp

Posted at

はじめに(Introduction)

N4910 Working Draft, Standard for Programming Language C++

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

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

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

コンパイラの実装状況

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

作業方針(sequence)

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

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

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

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

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

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

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

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

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

28.8 Numbers [numbers] C++N4910:2022 (671) p1354.cpp

算譜(source code)

p1354.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 = "28.8 Numbers [numbers] C++N4910:2022 (671) p1354.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;

// 28.8.1 Header <numbers> synopsis  [numbers.syn]
  namespace std::numbers {
    template<class T> inline constexpr T e_v<T> = unspecified ;
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
    template<class T> inline constexpr T pi_v<T> = unspecified ;
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
    template<class T> inline constexpr T ln2_v<T> = unspecified ;
    template<class T> inline constexpr T ln10_v<T> = unspecified ;
    template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
    template<class T> inline constexpr T sqrt3_v<T> = unspecified ;
    template<class T> inline constexpr T inv_sqrt3_v<T> = unspecified ;
    template<class T> inline constexpr T egamma_v<T> = unspecified ;
    template<class T> inline constexpr T  phi_v = unspecified ;
template<floating_point T> inline constexpr T e_v = see_below;
template<floating_point T> inline constexpr T log2e_v = see_below;
template<floating_point T> inline constexpr T log10e_v = see_below;
template<floating_point T> inline constexpr T pi_v = see_below;
template<floating_point T> inline constexpr T inv_pi_v = see_below;
template<floating_point T> inline constexpr T inv_sqrtpi_v = see_below;
template<floating_point T> inline constexpr T ln2_v = see_below;
template<floating_point T> inline constexpr T ln10_v = see_below;
template<floating_point T> inline constexpr T sqrt2_v = see_below;
template<floating_point T> inline constexpr T sqrt3_v = see_below;
template<floating_point T> inline constexpr T inv_sqrt3_v = see_below;
template<floating_point T> inline constexpr T egamma_v = see_below;
template<floating_point T> inline constexpr T phi_v<T> = see_below;
inline constexpr double e = e_v<double>;
inline constexpr double log2e = log2e_v<double>;
inline constexpr double log10e = log10e_v<double>;
inline constexpr double pi = pi_v<double>;
inline constexpr double inv_pi double = inv_pi_v<double>;
inline constexpr double inv_sqrtpi = inv_sqrtpi_v<double>;
inline constexpr double ln2  = ln2_v<>;
inline constexpr double ln10 = ln10_v<double>;
inline constexpr double sqrt2 = sqrt2_v<double>;
inline constexpr double sqrt3 = sqrt3_v<double>;
inline constexpr double inv_sqrt3  = inv_sqrt3_v<double>;
inline constexpr double egamma = egamma_v<double>;
inline constexpr double phi = phi_v<double>;
}
// 28.8.2 Mathematical constants [math.constants]
//  The library-defined partial specializations of mathematical constant variable templates are initialized with the nearest representable values of e, log e, log e, π, 1 , 1 , ln 2, ln 10, √2, √3, 1 , the Euler-Mascheroni 2 10 π√π √3 √ γ constant, and the golden ratio φ constant 1+ 5 , respectively. 2
// Pursuant to 16.4.5.2.1, a program may partially or explicitly specialize a mathematical constant variable template provided that the specialization depends on a program-defined type.
// A program that instantiates a primary template of a mathematical constant variable template is ill-formed.
int main(){
  cout  <<  n4910 << endl;
  return EXIT_SUCCESS;
}

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

bash
$ clang++ p1354.cpp -std=03 -o p1354l -I. -Wall
In file included from p1354.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 \
 ^
p1354.cpp:15:16: warning: nested namespace definition is a C++17 extension; define each namespace separately [-Wc++17-extensions]
  namespace std::numbers {
               ^~~~~~~~~
                { namespace numbers
p1354.cpp:16:30: error: unknown type name 'constexpr'
    template<class T> inline constexpr T e_v<T> = unspecified ;
                             ^
p1354.cpp:16:40: warning: variable templates are a C++14 extension [-Wc++14-extensions]
    template<class T> inline constexpr T e_v<T> = unspecified ;
                                       ^
p1354.cpp:16:23: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    template<class T> inline constexpr T e_v<T> = unspecified ;
                      ^
p1354.cpp:16:41: error: expected ';' at end of declaration
    template<class T> inline constexpr T e_v<T> = unspecified ;
                                        ^
                                        ;
p1354.cpp:16:49: error: expected unqualified-id
    template<class T> inline constexpr T e_v<T> = unspecified ;
                                                ^
p1354.cpp:17:30: error: unknown type name 'constexpr'
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                             ^
p1354.cpp:17:40: warning: variable templates are a C++14 extension [-Wc++14-extensions]
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                                       ^
p1354.cpp:17:23: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                      ^
p1354.cpp:17:41: error: expected ';' at end of declaration
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                                        ^
                                        ;
p1354.cpp:17:53: error: expected unqualified-id
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                                                    ^
p1354.cpp:18:30: error: unknown type name 'constexpr'
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                             ^
p1354.cpp:18:40: warning: variable templates are a C++14 extension [-Wc++14-extensions]
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                                       ^
p1354.cpp:18:23: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                      ^
p1354.cpp:18:41: error: expected ';' at end of declaration
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                                        ^
                                        ;
p1354.cpp:18:54: error: expected unqualified-id
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                                                     ^
p1354.cpp:19:30: error: unknown type name 'constexpr'
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                             ^
p1354.cpp:19:40: warning: variable templates are a C++14 extension [-Wc++14-extensions]
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                                       ^
p1354.cpp:19:23: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                      ^
p1354.cpp:19:41: error: expected ';' at end of declaration
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                                        ^
                                        ;
p1354.cpp:19:50: error: expected unqualified-id
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                                                 ^
p1354.cpp:20:30: error: unknown type name 'constexpr'
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                             ^
p1354.cpp:20:40: warning: variable templates are a C++14 extension [-Wc++14-extensions]
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                                       ^
p1354.cpp:20:23: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                      ^
p1354.cpp:20:41: error: expected ';' at end of declaration
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                                        ^
                                        ;
p1354.cpp:20:54: error: expected unqualified-id
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                                                     ^
p1354.cpp:21:30: error: unknown type name 'constexpr'
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                             ^
p1354.cpp:21:40: warning: variable templates are a C++14 extension [-Wc++14-extensions]
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                                       ^
p1354.cpp:21:23: warning: inline variables are a C++17 extension [-Wc++17-extensions]
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                      ^
p1354.cpp:21:41: error: expected ';' at end of declaration
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                                        ^
                                        ;
p1354.cpp:21:58: error: expected unqualified-id
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                                                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
13 warnings and 20 errors generated.
$ clang++ p1354.cpp -std=2b -o p1354l -I. -Wall
p1354.cpp:16:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T e_v<T> = unspecified ;
                                         ^
p1354.cpp:16:51: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T e_v<T> = unspecified ;
                                                  ^
p1354.cpp:17:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                                         ^
p1354.cpp:17:55: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T log2e_v<T> = unspecified ;
                                                      ^
p1354.cpp:18:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                                         ^
p1354.cpp:18:56: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T log10e_v<T> = unspecified ;
                                                       ^
p1354.cpp:19:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                                         ^
p1354.cpp:19:52: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T pi_v<T> = unspecified ;
                                                   ^
p1354.cpp:20:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                                         ^
p1354.cpp:20:56: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
                                                       ^
p1354.cpp:21:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                                         ^
p1354.cpp:21:60: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
                                                           ^
p1354.cpp:22:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T ln2_v<T> = unspecified ;
                                         ^
p1354.cpp:22:53: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T ln2_v<T> = unspecified ;
                                                    ^
p1354.cpp:23:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T ln10_v<T> = unspecified ;
                                         ^
p1354.cpp:23:54: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T ln10_v<T> = unspecified ;
                                                     ^
p1354.cpp:24:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
                                         ^
p1354.cpp:24:55: error: use of undeclared identifier 'unspecified'
    template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
                                                      ^
p1354.cpp:25:42: error: no variable template matches partial specialization
    template<class T> inline constexpr T sqrt3_v<T> = unspecified ;
                                         ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p1354.cpp -std=03 -o p1354g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1354.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 \
      |  ^~~~~
p1354.cpp:16:30: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
   16 |     template<class T> inline constexpr T e_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:16:30: error: 'constexpr' does not name a type
p1354.cpp:16:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:17:30: error: 'constexpr' does not name a type
   17 |     template<class T> inline constexpr T log2e_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:17:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:18:30: error: 'constexpr' does not name a type
   18 |     template<class T> inline constexpr T log10e_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:18:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:19:30: error: 'constexpr' does not name a type
   19 |     template<class T> inline constexpr T pi_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:19:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:20:30: error: 'constexpr' does not name a type
   20 |     template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:20:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:21:30: error: 'constexpr' does not name a type
   21 |     template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:21:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:22:30: error: 'constexpr' does not name a type
   22 |     template<class T> inline constexpr T ln2_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:22:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:23:30: error: 'constexpr' does not name a type
   23 |     template<class T> inline constexpr T ln10_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:23:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:24:30: error: 'constexpr' does not name a type
   24 |     template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:24:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:25:30: error: 'constexpr' does not name a type
   25 |     template<class T> inline constexpr T sqrt3_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:25:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:26:30: error: 'constexpr' does not name a type
   26 |     template<class T> inline constexpr T inv_sqrt3_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:26:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:27:30: error: 'constexpr' does not name a type
   27 |     template<class T> inline constexpr T egamma_v<T> = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:27:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:28:30: error: 'constexpr' does not name a type
   28 |     template<class T> inline constexpr T  phi_v = unspecified ;
      |                              ^~~~~~~~~
p1354.cpp:28:30: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:29:10: error: 'floating_point' has not been declared
   29 | template<floating_point T> inline constexpr T e_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:29:35: error: 'constexpr' does not name a type
   29 | template<floating_point T> inline constexpr T e_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:29:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:30:10: error: 'floating_point' has not been declared
   30 | template<floating_point T> inline constexpr T log2e_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:30:35: error: 'constexpr' does not name a type
   30 | template<floating_point T> inline constexpr T log2e_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:30:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:31:10: error: 'floating_point' has not been declared
   31 | template<floating_point T> inline constexpr T log10e_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:31:35: error: 'constexpr' does not name a type
   31 | template<floating_point T> inline constexpr T log10e_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:31:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:32:10: error: 'floating_point' has not been declared
   32 | template<floating_point T> inline constexpr T pi_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:32:35: error: 'constexpr' does not name a type
   32 | template<floating_point T> inline constexpr T pi_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:32:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:33:10: error: 'floating_point' has not been declared
   33 | template<floating_point T> inline constexpr T inv_pi_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:33:35: error: 'constexpr' does not name a type
   33 | template<floating_point T> inline constexpr T inv_pi_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:33:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:34:10: error: 'floating_point' has not been declared
   34 | template<floating_point T> inline constexpr T inv_sqrtpi_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:34:35: error: 'constexpr' does not name a type
   34 | template<floating_point T> inline constexpr T inv_sqrtpi_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:34:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:35:10: error: 'floating_point' has not been declared
   35 | template<floating_point T> inline constexpr T ln2_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:35:35: error: 'constexpr' does not name a type
   35 | template<floating_point T> inline constexpr T ln2_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:35:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:36:10: error: 'floating_point' has not been declared
   36 | template<floating_point T> inline constexpr T ln10_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:36:35: error: 'constexpr' does not name a type
   36 | template<floating_point T> inline constexpr T ln10_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:36:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:37:10: error: 'floating_point' has not been declared
   37 | template<floating_point T> inline constexpr T sqrt2_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:37:35: error: 'constexpr' does not name a type
   37 | template<floating_point T> inline constexpr T sqrt2_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:37:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:38:10: error: 'floating_point' has not been declared
   38 | template<floating_point T> inline constexpr T sqrt3_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:38:35: error: 'constexpr' does not name a type
   38 | template<floating_point T> inline constexpr T sqrt3_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:38:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:39:10: error: 'floating_point' has not been declared
   39 | template<floating_point T> inline constexpr T inv_sqrt3_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:39:35: error: 'constexpr' does not name a type
   39 | template<floating_point T> inline constexpr T inv_sqrt3_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:39:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:40:10: error: 'floating_point' has not been declared
   40 | template<floating_point T> inline constexpr T egamma_v = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:40:35: error: 'constexpr' does not name a type
   40 | template<floating_point T> inline constexpr T egamma_v = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:40:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:41:10: error: 'floating_point' has not been declared
   41 | template<floating_point T> inline constexpr T phi_v<T> = see_below;
      |          ^~~~~~~~~~~~~~
p1354.cpp:41:35: error: 'constexpr' does not name a type
   41 | template<floating_point T> inline constexpr T phi_v<T> = see_below;
      |                                   ^~~~~~~~~
p1354.cpp:41:35: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:42:8: error: 'constexpr' does not name a type
   42 | inline constexpr double e = e_v<double>;
      |        ^~~~~~~~~
p1354.cpp:42:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:43:8: error: 'constexpr' does not name a type
   43 | inline constexpr double log2e = log2e_v<double>;
      |        ^~~~~~~~~
p1354.cpp:43:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:44:8: error: 'constexpr' does not name a type
   44 | inline constexpr double log10e = log10e_v<double>;
      |        ^~~~~~~~~
p1354.cpp:44:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:45:8: error: 'constexpr' does not name a type
   45 | inline constexpr double pi = pi_v<double>;
      |        ^~~~~~~~~
p1354.cpp:45:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:46:8: error: 'constexpr' does not name a type
   46 | inline constexpr double inv_pi double = inv_pi_v<double>;
      |        ^~~~~~~~~
p1354.cpp:46:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:47:8: error: 'constexpr' does not name a type
   47 | inline constexpr double inv_sqrtpi = inv_sqrtpi_v<double>;
      |        ^~~~~~~~~
p1354.cpp:47:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:48:8: error: 'constexpr' does not name a type
   48 | inline constexpr double ln2  = ln2_v<>;
      |        ^~~~~~~~~
p1354.cpp:48:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:49:8: error: 'constexpr' does not name a type
   49 | inline constexpr double ln10 = ln10_v<double>;
      |        ^~~~~~~~~
p1354.cpp:49:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:50:8: error: 'constexpr' does not name a type
   50 | inline constexpr double sqrt2 = sqrt2_v<double>;
      |        ^~~~~~~~~
p1354.cpp:50:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:51:8: error: 'constexpr' does not name a type
   51 | inline constexpr double sqrt3 = sqrt3_v<double>;
      |        ^~~~~~~~~
p1354.cpp:51:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:52:8: error: 'constexpr' does not name a type
   52 | inline constexpr double inv_sqrt3  = inv_sqrt3_v<double>;
      |        ^~~~~~~~~
p1354.cpp:52:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:53:8: error: 'constexpr' does not name a type
   53 | inline constexpr double egamma = egamma_v<double>;
      |        ^~~~~~~~~
p1354.cpp:53:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1354.cpp:54:8: error: 'constexpr' does not name a type
   54 | inline constexpr double phi = phi_v<double>;
      |        ^~~~~~~~~
p1354.cpp:54:8: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'

$ g++ p1354.cpp -std=2b -o p1354g -I. -Wall
p1354.cpp:16:42: error: partial specialization 'std::numbers::e_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   16 |     template<class T> inline constexpr T e_v<T> = unspecified ;
      |                                          ^~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/max_size_type.h:37,
                 from /usr/local/include/c++/12.1.0/bits/ranges_base.h:38,
                 from /usr/local/include/c++/12.1.0/string_view:50,
                 from /usr/local/include/c++/12.1.0/bits/basic_string.h:48,
                 from /usr/local/include/c++/12.1.0/string:53,
                 from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
                 from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
                 from /usr/local/include/c++/12.1.0/ios:42,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39,
                 from N4910.h:2,
                 from p1354.cpp:10:
/usr/local/include/c++/12.1.0/numbers:59:26: note: primary template here
   59 |     inline constexpr _Tp e_v
      |                          ^~~
p1354.cpp:16:42: error: partial specialization of 'std::numbers::e_v<T>' after instantiation of 'std::numbers::e_v<double>' [-fpermissive]
   16 |     template<class T> inline constexpr T e_v<T> = unspecified ;
      |                                          ^~~~~~
p1354.cpp:16:51: error: 'unspecified' was not declared in this scope
   16 |     template<class T> inline constexpr T e_v<T> = unspecified ;
      |                                                   ^~~~~~~~~~~
p1354.cpp:17:42: error: partial specialization 'std::numbers::log2e_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   17 |     template<class T> inline constexpr T log2e_v<T> = unspecified ;
      |                                          ^~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:64:26: note: primary template here
   64 |     inline constexpr _Tp log2e_v
      |                          ^~~~~~~
p1354.cpp:17:42: error: partial specialization of 'std::numbers::log2e_v<T>' after instantiation of 'std::numbers::log2e_v<double>' [-fpermissive]
   17 |     template<class T> inline constexpr T log2e_v<T> = unspecified ;
      |                                          ^~~~~~~~~~
p1354.cpp:17:55: error: 'unspecified' was not declared in this scope
   17 |     template<class T> inline constexpr T log2e_v<T> = unspecified ;
      |                                                       ^~~~~~~~~~~
p1354.cpp:18:42: error: partial specialization 'std::numbers::log10e_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   18 |     template<class T> inline constexpr T log10e_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:69:26: note: primary template here
   69 |     inline constexpr _Tp log10e_v
      |                          ^~~~~~~~
p1354.cpp:18:42: error: partial specialization of 'std::numbers::log10e_v<T>' after instantiation of 'std::numbers::log10e_v<double>' [-fpermissive]
   18 |     template<class T> inline constexpr T log10e_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~
p1354.cpp:18:56: error: 'unspecified' was not declared in this scope
   18 |     template<class T> inline constexpr T log10e_v<T> = unspecified ;
      |                                                        ^~~~~~~~~~~
p1354.cpp:19:42: error: partial specialization 'std::numbers::pi_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   19 |     template<class T> inline constexpr T pi_v<T> = unspecified ;
      |                                          ^~~~~~~
/usr/local/include/c++/12.1.0/numbers:74:26: note: primary template here
   74 |     inline constexpr _Tp pi_v
      |                          ^~~~
p1354.cpp:19:42: error: partial specialization of 'std::numbers::pi_v<T>' after instantiation of 'std::numbers::pi_v<double>' [-fpermissive]
   19 |     template<class T> inline constexpr T pi_v<T> = unspecified ;
      |                                          ^~~~~~~
p1354.cpp:19:52: error: 'unspecified' was not declared in this scope
   19 |     template<class T> inline constexpr T pi_v<T> = unspecified ;
      |                                                    ^~~~~~~~~~~
p1354.cpp:20:42: error: partial specialization 'std::numbers::inv_pi_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   20 |     template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:79:26: note: primary template here
   79 |     inline constexpr _Tp inv_pi_v
      |                          ^~~~~~~~
p1354.cpp:20:42: error: partial specialization of 'std::numbers::inv_pi_v<T>' after instantiation of 'std::numbers::inv_pi_v<double>' [-fpermissive]
   20 |     template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~
p1354.cpp:20:56: error: 'unspecified' was not declared in this scope
   20 |     template<class T> inline constexpr T inv_pi_v<T> = unspecified ;
      |                                                        ^~~~~~~~~~~
p1354.cpp:21:42: error: partial specialization 'std::numbers::inv_sqrtpi_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   21 |     template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:84:26: note: primary template here
   84 |     inline constexpr _Tp inv_sqrtpi_v
      |                          ^~~~~~~~~~~~
p1354.cpp:21:42: error: partial specialization of 'std::numbers::inv_sqrtpi_v<T>' after instantiation of 'std::numbers::inv_sqrtpi_v<double>' [-fpermissive]
   21 |     template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~~~~~
p1354.cpp:21:60: error: 'unspecified' was not declared in this scope
   21 |     template<class T> inline constexpr T inv_sqrtpi_v<T> = unspecified ;
      |                                                            ^~~~~~~~~~~
p1354.cpp:22:42: error: partial specialization 'std::numbers::ln2_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   22 |     template<class T> inline constexpr T ln2_v<T> = unspecified ;
      |                                          ^~~~~~~~
/usr/local/include/c++/12.1.0/numbers:89:26: note: primary template here
   89 |     inline constexpr _Tp ln2_v
      |                          ^~~~~
p1354.cpp:22:42: error: partial specialization of 'std::numbers::ln2_v<T>' after instantiation of 'std::numbers::ln2_v<double>' [-fpermissive]
   22 |     template<class T> inline constexpr T ln2_v<T> = unspecified ;
      |                                          ^~~~~~~~
p1354.cpp:22:53: error: 'unspecified' was not declared in this scope
   22 |     template<class T> inline constexpr T ln2_v<T> = unspecified ;
      |                                                     ^~~~~~~~~~~
p1354.cpp:23:42: error: partial specialization 'std::numbers::ln10_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   23 |     template<class T> inline constexpr T ln10_v<T> = unspecified ;
      |                                          ^~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:94:26: note: primary template here
   94 |     inline constexpr _Tp ln10_v
      |                          ^~~~~~
p1354.cpp:23:42: error: partial specialization of 'std::numbers::ln10_v<T>' after instantiation of 'std::numbers::ln10_v<double>' [-fpermissive]
   23 |     template<class T> inline constexpr T ln10_v<T> = unspecified ;
      |                                          ^~~~~~~~~
p1354.cpp:23:54: error: 'unspecified' was not declared in this scope
   23 |     template<class T> inline constexpr T ln10_v<T> = unspecified ;
      |                                                      ^~~~~~~~~~~
p1354.cpp:24:42: error: partial specialization 'std::numbers::sqrt2_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   24 |     template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
      |                                          ^~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:99:26: note: primary template here
   99 |     inline constexpr _Tp sqrt2_v
      |                          ^~~~~~~
p1354.cpp:24:42: error: partial specialization of 'std::numbers::sqrt2_v<T>' after instantiation of 'std::numbers::sqrt2_v<double>' [-fpermissive]
   24 |     template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
      |                                          ^~~~~~~~~~
p1354.cpp:24:55: error: 'unspecified' was not declared in this scope
   24 |     template<class T> inline constexpr T sqrt2_v<T> = unspecified ;
      |                                                       ^~~~~~~~~~~
p1354.cpp:25:42: error: partial specialization 'std::numbers::sqrt3_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   25 |     template<class T> inline constexpr T sqrt3_v<T> = unspecified ;
      |                                          ^~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:104:26: note: primary template here
  104 |     inline constexpr _Tp sqrt3_v
      |                          ^~~~~~~
p1354.cpp:25:42: error: partial specialization of 'std::numbers::sqrt3_v<T>' after instantiation of 'std::numbers::sqrt3_v<double>' [-fpermissive]
   25 |     template<class T> inline constexpr T sqrt3_v<T> = unspecified ;
      |                                          ^~~~~~~~~~
p1354.cpp:25:55: error: 'unspecified' was not declared in this scope
   25 |     template<class T> inline constexpr T sqrt3_v<T> = unspecified ;
      |                                                       ^~~~~~~~~~~
p1354.cpp:26:42: error: partial specialization 'std::numbers::inv_sqrt3_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   26 |     template<class T> inline constexpr T inv_sqrt3_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:109:26: note: primary template here
  109 |     inline constexpr _Tp inv_sqrt3_v
      |                          ^~~~~~~~~~~
p1354.cpp:26:42: error: partial specialization of 'std::numbers::inv_sqrt3_v<T>' after instantiation of 'std::numbers::inv_sqrt3_v<double>' [-fpermissive]
   26 |     template<class T> inline constexpr T inv_sqrt3_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~~~~
p1354.cpp:26:59: error: 'unspecified' was not declared in this scope
   26 |     template<class T> inline constexpr T inv_sqrt3_v<T> = unspecified ;
      |                                                           ^~~~~~~~~~~
p1354.cpp:27:42: error: partial specialization 'std::numbers::egamma_v<T>' does not specialize any template arguments and is not more constrained than the primary template; to define the primary template, remove the template argument list
   27 |     template<class T> inline constexpr T egamma_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:114:26: note: primary template here
  114 |     inline constexpr _Tp egamma_v
      |                          ^~~~~~~~
p1354.cpp:27:42: error: partial specialization of 'std::numbers::egamma_v<T>' after instantiation of 'std::numbers::egamma_v<double>' [-fpermissive]
   27 |     template<class T> inline constexpr T egamma_v<T> = unspecified ;
      |                                          ^~~~~~~~~~~
p1354.cpp:27:56: error: 'unspecified' was not declared in this scope
   27 |     template<class T> inline constexpr T egamma_v<T> = unspecified ;
      |                                                        ^~~~~~~~~~~
p1354.cpp:28:43: error: redefinition of 'template<class T> constexpr const T std::numbers::phi_v'
   28 |     template<class T> inline constexpr T  phi_v = unspecified ;
      |                                           ^~~~~
/usr/local/include/c++/12.1.0/numbers:119:26: note: 'template<class _Tp> constexpr const _Tp std::numbers::phi_v<_Tp>' previously declared here
  119 |     inline constexpr _Tp phi_v
      |                          ^~~~~
p1354.cpp:28:51: error: 'unspecified' was not declared in this scope
   28 |     template<class T> inline constexpr T  phi_v = unspecified ;
      |                                                   ^~~~~~~~~~~
p1354.cpp:29:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::e_v'
   29 | template<floating_point T> inline constexpr T e_v = see_below;
      |                                               ^~~
/usr/local/include/c++/12.1.0/numbers:59:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::e_v<_Tp>'
   59 |     inline constexpr _Tp e_v
      |                          ^~~
p1354.cpp:29:53: error: 'see_below' was not declared in this scope
   29 | template<floating_point T> inline constexpr T e_v = see_below;
      |                                                     ^~~~~~~~~
p1354.cpp:30:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::log2e_v'
   30 | template<floating_point T> inline constexpr T log2e_v = see_below;
      |                                               ^~~~~~~
/usr/local/include/c++/12.1.0/numbers:64:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::log2e_v<_Tp>'
   64 |     inline constexpr _Tp log2e_v
      |                          ^~~~~~~
p1354.cpp:30:57: error: 'see_below' was not declared in this scope
   30 | template<floating_point T> inline constexpr T log2e_v = see_below;
      |                                                         ^~~~~~~~~
p1354.cpp:31:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::log10e_v'
   31 | template<floating_point T> inline constexpr T log10e_v = see_below;
      |                                               ^~~~~~~~
/usr/local/include/c++/12.1.0/numbers:69:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::log10e_v<_Tp>'
   69 |     inline constexpr _Tp log10e_v
      |                          ^~~~~~~~
p1354.cpp:31:58: error: 'see_below' was not declared in this scope
   31 | template<floating_point T> inline constexpr T log10e_v = see_below;
      |                                                          ^~~~~~~~~
p1354.cpp:32:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::pi_v'
   32 | template<floating_point T> inline constexpr T pi_v = see_below;
      |                                               ^~~~
/usr/local/include/c++/12.1.0/numbers:74:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::pi_v<_Tp>'
   74 |     inline constexpr _Tp pi_v
      |                          ^~~~
p1354.cpp:32:54: error: 'see_below' was not declared in this scope
   32 | template<floating_point T> inline constexpr T pi_v = see_below;
      |                                                      ^~~~~~~~~
p1354.cpp:33:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::inv_pi_v'
   33 | template<floating_point T> inline constexpr T inv_pi_v = see_below;
      |                                               ^~~~~~~~
/usr/local/include/c++/12.1.0/numbers:79:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::inv_pi_v<_Tp>'
   79 |     inline constexpr _Tp inv_pi_v
      |                          ^~~~~~~~
p1354.cpp:33:58: error: 'see_below' was not declared in this scope
   33 | template<floating_point T> inline constexpr T inv_pi_v = see_below;
      |                                                          ^~~~~~~~~
p1354.cpp:34:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::inv_sqrtpi_v'
   34 | template<floating_point T> inline constexpr T inv_sqrtpi_v = see_below;
      |                                               ^~~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:84:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::inv_sqrtpi_v<_Tp>'
   84 |     inline constexpr _Tp inv_sqrtpi_v
      |                          ^~~~~~~~~~~~
p1354.cpp:34:62: error: 'see_below' was not declared in this scope
   34 | template<floating_point T> inline constexpr T inv_sqrtpi_v = see_below;
      |                                                              ^~~~~~~~~
p1354.cpp:35:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::ln2_v'
   35 | template<floating_point T> inline constexpr T ln2_v = see_below;
      |                                               ^~~~~
/usr/local/include/c++/12.1.0/numbers:89:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::ln2_v<_Tp>'
   89 |     inline constexpr _Tp ln2_v
      |                          ^~~~~
p1354.cpp:35:55: error: 'see_below' was not declared in this scope
   35 | template<floating_point T> inline constexpr T ln2_v = see_below;
      |                                                       ^~~~~~~~~
p1354.cpp:36:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::ln10_v'
   36 | template<floating_point T> inline constexpr T ln10_v = see_below;
      |                                               ^~~~~~
/usr/local/include/c++/12.1.0/numbers:94:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::ln10_v<_Tp>'
   94 |     inline constexpr _Tp ln10_v
      |                          ^~~~~~
p1354.cpp:36:56: error: 'see_below' was not declared in this scope
   36 | template<floating_point T> inline constexpr T ln10_v = see_below;
      |                                                        ^~~~~~~~~
p1354.cpp:37:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::sqrt2_v'
   37 | template<floating_point T> inline constexpr T sqrt2_v = see_below;
      |                                               ^~~~~~~
/usr/local/include/c++/12.1.0/numbers:99:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::sqrt2_v<_Tp>'
   99 |     inline constexpr _Tp sqrt2_v
      |                          ^~~~~~~
p1354.cpp:37:57: error: 'see_below' was not declared in this scope
   37 | template<floating_point T> inline constexpr T sqrt2_v = see_below;
      |                                                         ^~~~~~~~~
p1354.cpp:38:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::sqrt3_v'
   38 | template<floating_point T> inline constexpr T sqrt3_v = see_below;
      |                                               ^~~~~~~
/usr/local/include/c++/12.1.0/numbers:104:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::sqrt3_v<_Tp>'
  104 |     inline constexpr _Tp sqrt3_v
      |                          ^~~~~~~
p1354.cpp:38:57: error: 'see_below' was not declared in this scope
   38 | template<floating_point T> inline constexpr T sqrt3_v = see_below;
      |                                                         ^~~~~~~~~
p1354.cpp:39:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::inv_sqrt3_v'
   39 | template<floating_point T> inline constexpr T inv_sqrt3_v = see_below;
      |                                               ^~~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:109:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::inv_sqrt3_v<_Tp>'
  109 |     inline constexpr _Tp inv_sqrt3_v
      |                          ^~~~~~~~~~~
p1354.cpp:39:61: error: 'see_below' was not declared in this scope
   39 | template<floating_point T> inline constexpr T inv_sqrt3_v = see_below;
      |                                                             ^~~~~~~~~
p1354.cpp:40:47: error: redeclaration of 'template<class T>  requires  floating_point<T> constexpr const T std::numbers::egamma_v'
   40 | template<floating_point T> inline constexpr T egamma_v = see_below;
      |                                               ^~~~~~~~
/usr/local/include/c++/12.1.0/numbers:114:26: note: previous declaration 'template<class _Tp> constexpr const _Tp std::numbers::egamma_v<_Tp>'
  114 |     inline constexpr _Tp egamma_v
      |                          ^~~~~~~~
p1354.cpp:40:58: error: 'see_below' was not declared in this scope
   40 | template<floating_point T> inline constexpr T egamma_v = see_below;
      |                                                          ^~~~~~~~~
p1354.cpp:41:47: error: partial specialization of 'std::numbers::phi_v<T>' after instantiation of 'std::numbers::phi_v<double>' [-fpermissive]
   41 | template<floating_point T> inline constexpr T phi_v<T> = see_below;
      |                                               ^~~~~~~~
p1354.cpp:41:58: error: 'see_below' was not declared in this scope
   41 | template<floating_point T> inline constexpr T phi_v<T> = see_below;
      |                                                          ^~~~~~~~~
p1354.cpp:42:25: error: redefinition of 'constexpr const double std::numbers::e'
   42 | inline constexpr double e = e_v<double>;
      |                         ^
/usr/local/include/c++/12.1.0/numbers:122:27: note: 'constexpr const double std::numbers::e' previously defined here
  122 |   inline constexpr double e = e_v<double>;
      |                           ^
p1354.cpp:43:25: error: redefinition of 'constexpr const double std::numbers::log2e'
   43 | inline constexpr double log2e = log2e_v<double>;
      |                         ^~~~~
/usr/local/include/c++/12.1.0/numbers:123:27: note: 'constexpr const double std::numbers::log2e' previously defined here
  123 |   inline constexpr double log2e = log2e_v<double>;
      |                           ^~~~~
p1354.cpp:44:25: error: redefinition of 'constexpr const double std::numbers::log10e'
   44 | inline constexpr double log10e = log10e_v<double>;
      |                         ^~~~~~
/usr/local/include/c++/12.1.0/numbers:124:27: note: 'constexpr const double std::numbers::log10e' previously defined here
  124 |   inline constexpr double log10e = log10e_v<double>;
      |                           ^~~~~~
p1354.cpp:45:25: error: redefinition of 'constexpr const double std::numbers::pi'
   45 | inline constexpr double pi = pi_v<double>;
      |                         ^~
/usr/local/include/c++/12.1.0/numbers:125:27: note: 'constexpr const double std::numbers::pi' previously defined here
  125 |   inline constexpr double pi = pi_v<double>;
      |                           ^~
p1354.cpp:46:32: error: expected initializer before 'double'
   46 | inline constexpr double inv_pi double = inv_pi_v<double>;
      |                                ^~~~~~
p1354.cpp:47:25: error: redefinition of 'constexpr const double std::numbers::inv_sqrtpi'
   47 | inline constexpr double inv_sqrtpi = inv_sqrtpi_v<double>;
      |                         ^~~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:127:27: note: 'constexpr const double std::numbers::inv_sqrtpi' previously defined here
  127 |   inline constexpr double inv_sqrtpi = inv_sqrtpi_v<double>;
      |                           ^~~~~~~~~~
p1354.cpp:48:25: error: redefinition of 'constexpr const double std::numbers::ln2'
   48 | inline constexpr double ln2  = ln2_v<>;
      |                         ^~~
/usr/local/include/c++/12.1.0/numbers:128:27: note: 'constexpr const double std::numbers::ln2' previously defined here
  128 |   inline constexpr double ln2 = ln2_v<double>;
      |                           ^~~
p1354.cpp:48:32: error: wrong number of template arguments (0, should be 1)
   48 | inline constexpr double ln2  = ln2_v<>;
      |                                ^~~~~~~
/usr/local/include/c++/12.1.0/numbers:89:26: note: provided for 'template<class _Tp> constexpr const _Tp std::numbers::ln2_v<_Tp>'
   89 |     inline constexpr _Tp ln2_v
      |                          ^~~~~
p1354.cpp:49:25: error: redefinition of 'constexpr const double std::numbers::ln10'
   49 | inline constexpr double ln10 = ln10_v<double>;
      |                         ^~~~
/usr/local/include/c++/12.1.0/numbers:129:27: note: 'constexpr const double std::numbers::ln10' previously defined here
  129 |   inline constexpr double ln10 = ln10_v<double>;
      |                           ^~~~
p1354.cpp:50:25: error: redefinition of 'constexpr const double std::numbers::sqrt2'
   50 | inline constexpr double sqrt2 = sqrt2_v<double>;
      |                         ^~~~~
/usr/local/include/c++/12.1.0/numbers:130:27: note: 'constexpr const double std::numbers::sqrt2' previously defined here
  130 |   inline constexpr double sqrt2 = sqrt2_v<double>;
      |                           ^~~~~
p1354.cpp:51:25: error: redefinition of 'constexpr const double std::numbers::sqrt3'
   51 | inline constexpr double sqrt3 = sqrt3_v<double>;
      |                         ^~~~~
/usr/local/include/c++/12.1.0/numbers:131:27: note: 'constexpr const double std::numbers::sqrt3' previously defined here
  131 |   inline constexpr double sqrt3 = sqrt3_v<double>;
      |                           ^~~~~
p1354.cpp:52:25: error: redefinition of 'constexpr const double std::numbers::inv_sqrt3'
   52 | inline constexpr double inv_sqrt3  = inv_sqrt3_v<double>;
      |                         ^~~~~~~~~
/usr/local/include/c++/12.1.0/numbers:132:27: note: 'constexpr const double std::numbers::inv_sqrt3' previously defined here
  132 |   inline constexpr double inv_sqrt3 = inv_sqrt3_v<double>;
      |                           ^~~~~~~~~
p1354.cpp:53:25: error: redefinition of 'constexpr const double std::numbers::egamma'
   53 | inline constexpr double egamma = egamma_v<double>;
      |                         ^~~~~~
/usr/local/include/c++/12.1.0/numbers:133:27: note: 'constexpr const double std::numbers::egamma' previously defined here
  133 |   inline constexpr double egamma = egamma_v<double>;
      |                           ^~~~~~
p1354.cpp:54:25: error: redefinition of 'constexpr const double std::numbers::phi'
   54 | inline constexpr double phi = phi_v<double>;
      |                         ^~~
/usr/local/include/c++/12.1.0/numbers:134:27: note: 'constexpr const double std::numbers::phi' previously defined here
  134 |   inline constexpr double phi = phi_v<double>;
      |                           ^~~

検討事項(agenda)

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

参考資料(reference)

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

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

#include "N4910.h"

C++N4910資料の改善点

dockerにclang

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

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

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

astyle 使ってみた

DoCAP(ドゥーキャップ)って何ですか?

小川メソッド 覚え(書きかけ)

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

文書履歴(document history)

ver. 0.01 初稿  20220818

0
0
0

Register as a new user and use Qiita more conveniently

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?