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