xref: /freebsd/contrib/llvm-project/libcxx/modules/std/functional.inc (revision 9c77fb6aaa366cbabc80ee1b834bcfe4df135491)
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
10export namespace std {
11  // [func.invoke], invoke
12  using std::invoke;
13#if _LIBCPP_STD_VER >= 23
14  using std::invoke_r;
15#endif
16
17#if _LIBCPP_STD_VER >= 20
18  using std::basic_common_reference;
19#endif
20
21  // [refwrap], reference_wrapper
22  using std::reference_wrapper;
23
24  using std::cref;
25  using std::ref;
26
27  // [arithmetic.operations], arithmetic operations
28  using std::divides;
29  using std::minus;
30  using std::modulus;
31  using std::multiplies;
32  using std::negate;
33  using std::plus;
34  // [comparisons], comparisons
35  using std::equal_to;
36  using std::greater;
37  using std::greater_equal;
38  using std::less;
39  using std::less_equal;
40  using std::not_equal_to;
41
42  // [comparisons.three.way], class compare_three_way
43  using std::compare_three_way;
44
45  // [logical.operations], logical operations
46  using std::logical_and;
47  using std::logical_not;
48  using std::logical_or;
49
50  // [bitwise.operations], bitwise operations
51  using std::bit_and;
52  using std::bit_not;
53  using std::bit_or;
54  using std::bit_xor;
55
56  // [func.identity], identity
57  using std::identity;
58
59  // [func.not.fn], function template not_fn
60  using std::not_fn;
61
62  // [func.bind.partial], function templates bind_front and bind_back
63  using std::bind_front;
64#if _LIBCPP_STD_VER >= 23
65  using std::bind_back;
66#endif
67
68  // [func.bind], bind
69  using std::is_bind_expression;
70  using std::is_bind_expression_v;
71  using std::is_placeholder;
72  using std::is_placeholder_v;
73
74  using std::bind;
75
76  namespace placeholders {
77    // M is the implementation-defined number of placeholders
78    using std::placeholders::_1;
79    using std::placeholders::_10;
80    using std::placeholders::_2;
81    using std::placeholders::_3;
82    using std::placeholders::_4;
83    using std::placeholders::_5;
84    using std::placeholders::_6;
85    using std::placeholders::_7;
86    using std::placeholders::_8;
87    using std::placeholders::_9;
88  } // namespace placeholders
89
90  // [func.memfn], member function adaptors
91  using std::mem_fn;
92
93  // [func.wrap], polymorphic function wrappers
94  using std::bad_function_call;
95
96  using std::function;
97
98  using std::swap;
99
100  using std::operator==;
101
102  // [func.wrap.move], move only wrapper
103  // using std::move_only_function;
104
105  // [func.search], searchers
106  using std::default_searcher;
107
108  using std::boyer_moore_searcher;
109
110  using std::boyer_moore_horspool_searcher;
111
112  // [unord.hash], class template hash
113  using std::hash;
114
115  namespace ranges {
116    // [range.cmp], concept-constrained comparisons
117    using std::ranges::equal_to;
118    using std::ranges::greater;
119    using std::ranges::greater_equal;
120    using std::ranges::less;
121    using std::ranges::less_equal;
122    using std::ranges::not_equal_to;
123  } // namespace ranges
124} // namespace std
125