1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // UNSUPPORTED: libcpp-no-concepts
11 
12 #include <numbers>
13 
14 // Initializing the primary template is ill-formed.
15 int log2e{std::numbers::log2e_v<
16     int>}; // expected-error-re@numbers:* {{static_assert failed {{.*}} "A program that instantiates a primary template of a mathematical constant variable template is ill-formed."}}
17 int log10e{std::numbers::log10e_v<int>};
18 int pi{std::numbers::pi_v<int>};
19 int inv_pi{std::numbers::inv_pi_v<int>};
20 int inv_sqrtpi{std::numbers::inv_sqrtpi_v<int>};
21 int ln2{std::numbers::ln2_v<int>};
22 int ln10{std::numbers::ln10_v<int>};
23 int sqrt2{std::numbers::sqrt2_v<int>};
24 int sqrt3{std::numbers::sqrt3_v<int>};
25 int inv_sqrt3{std::numbers::inv_sqrt3_v<int>};
26 int egamma{std::numbers::egamma_v<int>};
27 int phi{std::numbers::phi_v<int>};
28 
main(int,char **)29 int main(int, char**) { return 0; }
30