Debian Codegraph @

libcxx/modules/std/numeric.inc

raw
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 export namespace std {
11 // [accumulate], accumulate
12 using std::accumulate;
13
14 // [reduce], reduce
15 using std::reduce;
16
17 // [inner.product], inner product
18 using std::inner_product;
19
20 // [transform.reduce], transform reduce
21 using std::transform_reduce;
22
23 // [partial.sum], partial sum
24 using std::partial_sum;
25
26 // [exclusive.scan], exclusive scan
27 using std::exclusive_scan;
28
29 // [inclusive.scan], inclusive scan
30 using std::inclusive_scan;
31
32 // [transform.exclusive.scan], transform exclusive scan
33 using std::transform_exclusive_scan;
34
35 // [transform.inclusive.scan], transform inclusive scan
36 using std::transform_inclusive_scan;
37
38 // [adjacent.difference], adjacent difference
39 using std::adjacent_difference;
40
41 // [numeric.iota], iota
42 using std::iota;
43
44 namespace ranges {
45
46 #if _LIBCPP_STD_VER >= 23
47 using std::ranges::iota;
48 using std::ranges::iota_result;
49 #endif // _LIBCPP_STD_VER >= 23
50
51 } // namespace ranges
52
53 // [numeric.ops.gcd], greatest common divisor
54 using std::gcd;
55
56 // [numeric.ops.lcm], least common multiple
57 using std::lcm;
58
59 // [numeric.ops.midpoint], midpoint
60 using std::midpoint;
61
62 #if _LIBCPP_STD_VER >= 26
63 // [numeric.sat], saturation arithmetic
64 using std::add_sat;
65 using std::div_sat;
66 using std::mul_sat;
67 using std::saturate_cast;
68 using std::sub_sat;
69 #endif
70
71 } // namespace std