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
11#include <numbers>
12
13struct user {
14 int value;
15};
16
17template <>
18user std::numbers::e_v<user>{};
19
20template <>
21user std::numbers::log2e_v<user>{};
22
23template <>
24user std::numbers::log10e_v<user>{};
25
26template <>
27user std::numbers::pi_v<user>{};
28
29template <>
30user std::numbers::inv_pi_v<user>{};
31
32template <>
33user std::numbers::inv_sqrtpi_v<user>{};
34
35template <>
36user std::numbers::ln2_v<user>{};
37
38template <>
39user std::numbers::ln10_v<user>{};
40
41template <>
42user std::numbers::sqrt2_v<user>{};
43
44template <>
45user std::numbers::sqrt3_v<user>{};
46
47template <>
48user std::numbers::inv_sqrt3_v<user>{};
49
50template <>
51user std::numbers::egamma_v<user>{};
52
53template <>
54user std::numbers::phi_v<user>{};
55
56int main(int, char**) { return 0; }
57

source code of libcxx/test/std/numerics/numbers/user_type.pass.cpp