tmp/tmpevij8wzn/{from.md → to.md}
RENAMED
|
@@ -85,16 +85,21 @@ namespace std {
|
|
| 85 |
// [func.identity], identity
|
| 86 |
struct identity; // freestanding
|
| 87 |
|
| 88 |
// [func.not.fn], function template not_fn
|
| 89 |
template<class F> constexpr unspecified not_fn(F&& f); // freestanding
|
|
|
|
| 90 |
|
| 91 |
// [func.bind.partial], function templates bind_front and bind_back
|
| 92 |
template<class F, class... Args>
|
| 93 |
constexpr unspecified bind_front(F&&, Args&&...); // freestanding
|
|
|
|
|
|
|
| 94 |
template<class F, class... Args>
|
| 95 |
constexpr unspecified bind_back(F&&, Args&&...); // freestanding
|
|
|
|
|
|
|
| 96 |
|
| 97 |
// [func.bind], bind
|
| 98 |
template<class T> struct is_bind_expression; // freestanding
|
| 99 |
template<class T>
|
| 100 |
constexpr bool is_bind_expression_v = // freestanding
|
|
@@ -111,39 +116,49 @@ namespace std {
|
|
| 111 |
|
| 112 |
namespace placeholders {
|
| 113 |
// M is the implementation-defined number of placeholders
|
| 114 |
see belownc _1; // freestanding
|
| 115 |
see belownc _2; // freestanding
|
| 116 |
-
|
| 117 |
-
.
|
| 118 |
-
.
|
| 119 |
see belownc _M; // freestanding
|
| 120 |
}
|
| 121 |
|
| 122 |
// [func.memfn], member function adaptors
|
| 123 |
template<class R, class T>
|
| 124 |
constexpr unspecified mem_fn(R T::*) noexcept; // freestanding
|
| 125 |
|
| 126 |
// [func.wrap], polymorphic function wrappers
|
|
|
|
| 127 |
class bad_function_call;
|
| 128 |
|
|
|
|
| 129 |
template<class> class function; // not defined
|
| 130 |
template<class R, class... ArgTypes> class function<R(ArgTypes...)>;
|
| 131 |
|
| 132 |
-
// [func.wrap.func.alg], specialized algorithms
|
| 133 |
template<class R, class... ArgTypes>
|
| 134 |
void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&) noexcept;
|
| 135 |
|
| 136 |
-
// [func.wrap.func.nullptr], null pointer comparison operator functions
|
| 137 |
template<class R, class... ArgTypes>
|
| 138 |
bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
|
| 139 |
|
| 140 |
-
// [func.wrap.move], move
|
| 141 |
template<class... S> class move_only_function; // not defined
|
| 142 |
template<class R, class... ArgTypes>
|
| 143 |
class move_only_function<R(ArgTypes...) cv ref noexcept(noex)>; // see below
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
// [func.search], searchers
|
| 146 |
template<class ForwardIterator1, class BinaryPredicate = equal_to<>>
|
| 147 |
class default_searcher; // freestanding
|
| 148 |
|
| 149 |
template<class RandomAccessIterator,
|
|
@@ -167,10 +182,29 @@ namespace std {
|
|
| 167 |
struct greater; // freestanding
|
| 168 |
struct less; // freestanding
|
| 169 |
struct greater_equal; // freestanding
|
| 170 |
struct less_equal; // freestanding
|
| 171 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
}
|
| 173 |
```
|
| 174 |
|
| 175 |
[*Example 1*:
|
| 176 |
|
|
|
|
| 85 |
// [func.identity], identity
|
| 86 |
struct identity; // freestanding
|
| 87 |
|
| 88 |
// [func.not.fn], function template not_fn
|
| 89 |
template<class F> constexpr unspecified not_fn(F&& f); // freestanding
|
| 90 |
+
template<auto f> constexpr unspecified not_fn() noexcept; // freestanding
|
| 91 |
|
| 92 |
// [func.bind.partial], function templates bind_front and bind_back
|
| 93 |
template<class F, class... Args>
|
| 94 |
constexpr unspecified bind_front(F&&, Args&&...); // freestanding
|
| 95 |
+
template<auto f, class... Args>
|
| 96 |
+
constexpr unspecified bind_front(Args&&...); // freestanding
|
| 97 |
template<class F, class... Args>
|
| 98 |
constexpr unspecified bind_back(F&&, Args&&...); // freestanding
|
| 99 |
+
template<auto f, class... Args>
|
| 100 |
+
constexpr unspecified bind_back(Args&&...); // freestanding
|
| 101 |
|
| 102 |
// [func.bind], bind
|
| 103 |
template<class T> struct is_bind_expression; // freestanding
|
| 104 |
template<class T>
|
| 105 |
constexpr bool is_bind_expression_v = // freestanding
|
|
|
|
| 116 |
|
| 117 |
namespace placeholders {
|
| 118 |
// M is the implementation-defined number of placeholders
|
| 119 |
see belownc _1; // freestanding
|
| 120 |
see belownc _2; // freestanding
|
| 121 |
+
⋮
|
|
|
|
|
|
|
| 122 |
see belownc _M; // freestanding
|
| 123 |
}
|
| 124 |
|
| 125 |
// [func.memfn], member function adaptors
|
| 126 |
template<class R, class T>
|
| 127 |
constexpr unspecified mem_fn(R T::*) noexcept; // freestanding
|
| 128 |
|
| 129 |
// [func.wrap], polymorphic function wrappers
|
| 130 |
+
// [func.wrap.badcall], class bad_function_call
|
| 131 |
class bad_function_call;
|
| 132 |
|
| 133 |
+
// [func.wrap.func], class template function
|
| 134 |
template<class> class function; // not defined
|
| 135 |
template<class R, class... ArgTypes> class function<R(ArgTypes...)>;
|
| 136 |
|
| 137 |
+
// [func.wrap.func.alg], function specialized algorithms
|
| 138 |
template<class R, class... ArgTypes>
|
| 139 |
void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&) noexcept;
|
| 140 |
|
| 141 |
+
// [func.wrap.func.nullptr], function null pointer comparison operator functions
|
| 142 |
template<class R, class... ArgTypes>
|
| 143 |
bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
|
| 144 |
|
| 145 |
+
// [func.wrap.move], move-only wrapper
|
| 146 |
template<class... S> class move_only_function; // not defined
|
| 147 |
template<class R, class... ArgTypes>
|
| 148 |
class move_only_function<R(ArgTypes...) cv ref noexcept(noex)>; // see below
|
| 149 |
|
| 150 |
+
// [func.wrap.copy], copyable wrapper
|
| 151 |
+
template<class... S> class copyable_function; // not defined
|
| 152 |
+
template<class R, class... ArgTypes>
|
| 153 |
+
class copyable_function<R(ArgTypes...) cv ref noexcept(noex)>; // see below
|
| 154 |
+
|
| 155 |
+
// [func.wrap.ref], non-owning wrapper
|
| 156 |
+
template<class... S> class function_ref; // freestanding, not defined
|
| 157 |
+
template<class R, class... ArgTypes>
|
| 158 |
+
class function_ref<R(ArgTypes...) cv noexcept(noex)>; // freestanding, see below
|
| 159 |
+
|
| 160 |
// [func.search], searchers
|
| 161 |
template<class ForwardIterator1, class BinaryPredicate = equal_to<>>
|
| 162 |
class default_searcher; // freestanding
|
| 163 |
|
| 164 |
template<class RandomAccessIterator,
|
|
|
|
| 182 |
struct greater; // freestanding
|
| 183 |
struct less; // freestanding
|
| 184 |
struct greater_equal; // freestanding
|
| 185 |
struct less_equal; // freestanding
|
| 186 |
}
|
| 187 |
+
|
| 188 |
+
template<class Fn, class... Args>
|
| 189 |
+
concept callable = // exposition only
|
| 190 |
+
requires (Fn&& fn, Args&&... args) {
|
| 191 |
+
std::forward<Fn>(fn)(std::forward<Args>(args)...);
|
| 192 |
+
};
|
| 193 |
+
|
| 194 |
+
template<class Fn, class... Args>
|
| 195 |
+
concept nothrow-callable = // exposition only
|
| 196 |
+
callable<Fn, Args...> &&
|
| 197 |
+
requires (Fn&& fn, Args&&... args) {
|
| 198 |
+
{ std::forward<Fn>(fn)(std::forward<Args>(args)...) } noexcept;
|
| 199 |
+
};
|
| 200 |
+
|
| 201 |
+
template<class Fn, class... Args>
|
| 202 |
+
using call-result-t = decltype(declval<Fn>()(declval<Args>()...)); // exposition only
|
| 203 |
+
|
| 204 |
+
template<const auto& T>
|
| 205 |
+
using decayed-typeof = decltype(auto(T)); // exposition only
|
| 206 |
}
|
| 207 |
```
|
| 208 |
|
| 209 |
[*Example 1*:
|
| 210 |
|