14f6c4b47SRaul Tambre //===----------------------------------------------------------------------===// 24f6c4b47SRaul Tambre // 34f6c4b47SRaul Tambre // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 44f6c4b47SRaul Tambre // See https://llvm.org/LICENSE.txt for license information. 54f6c4b47SRaul Tambre // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 64f6c4b47SRaul Tambre // 74f6c4b47SRaul Tambre //===----------------------------------------------------------------------===// 84f6c4b47SRaul Tambre 9b5e896c0SLouis Dionne // UNSUPPORTED: c++03, c++11, c++14, c++17 104f6c4b47SRaul Tambre 114f6c4b47SRaul Tambre #include <numbers> 124f6c4b47SRaul Tambre 134f6c4b47SRaul Tambre // Initializing the primary template is ill-formed. 144f6c4b47SRaul Tambre int log2e{std::numbers::log2e_v< 15*76476efdSMuhammad Usman Shahid int>}; // expected-error-re@numbers:* {{{{(static_assert|static assertion)}} failed{{.*}}A program that instantiates a primary template of a mathematical constant variable template is ill-formed.}} 164f6c4b47SRaul Tambre int log10e{std::numbers::log10e_v<int>}; 174f6c4b47SRaul Tambre int pi{std::numbers::pi_v<int>}; 184f6c4b47SRaul Tambre int inv_pi{std::numbers::inv_pi_v<int>}; 194f6c4b47SRaul Tambre int inv_sqrtpi{std::numbers::inv_sqrtpi_v<int>}; 204f6c4b47SRaul Tambre int ln2{std::numbers::ln2_v<int>}; 214f6c4b47SRaul Tambre int ln10{std::numbers::ln10_v<int>}; 224f6c4b47SRaul Tambre int sqrt2{std::numbers::sqrt2_v<int>}; 234f6c4b47SRaul Tambre int sqrt3{std::numbers::sqrt3_v<int>}; 244f6c4b47SRaul Tambre int inv_sqrt3{std::numbers::inv_sqrt3_v<int>}; 254f6c4b47SRaul Tambre int egamma{std::numbers::egamma_v<int>}; 264f6c4b47SRaul Tambre int phi{std::numbers::phi_v<int>}; 274f6c4b47SRaul Tambre main(int,char **)28504bc07dSLouis Dionneint main(int, char**) { return 0; } 29