tmp/tmpw8m8yxfi/{from.md → to.md}
RENAMED
|
@@ -2,124 +2,151 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [func.invoke], invoke
|
| 6 |
template<class F, class... Args>
|
| 7 |
-
constexpr invoke_result_t<F, Args...> invoke(F&& f, Args&&... args)
|
| 8 |
noexcept(is_nothrow_invocable_v<F, Args...>);
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
// [refwrap], reference_wrapper
|
| 11 |
-
template<class T> class reference_wrapper;
|
| 12 |
|
| 13 |
-
template<class T> constexpr reference_wrapper<T> ref(T&) noexcept;
|
| 14 |
-
template<class T> constexpr reference_wrapper<const T> cref(const T&) noexcept;
|
| 15 |
-
template<class T> void ref(const T&&) = delete;
|
| 16 |
-
template<class T> void cref(const T&&) = delete;
|
| 17 |
|
| 18 |
-
template<class T>
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
// [arithmetic.operations], arithmetic operations
|
| 22 |
-
template<class T = void> struct plus;
|
| 23 |
-
template<class T = void> struct minus;
|
| 24 |
-
template<class T = void> struct multiplies;
|
| 25 |
-
template<class T = void> struct divides;
|
| 26 |
-
template<class T = void> struct modulus;
|
| 27 |
-
template<class T = void> struct negate;
|
| 28 |
-
template<> struct plus<void>;
|
| 29 |
-
template<> struct minus<void>;
|
| 30 |
-
template<> struct multiplies<void>;
|
| 31 |
-
template<> struct divides<void>;
|
| 32 |
-
template<> struct modulus<void>;
|
| 33 |
-
template<> struct negate<void>;
|
| 34 |
|
| 35 |
// [comparisons], comparisons
|
| 36 |
-
template<class T = void> struct equal_to;
|
| 37 |
-
template<class T = void> struct not_equal_to;
|
| 38 |
-
template<class T = void> struct greater;
|
| 39 |
-
template<class T = void> struct less;
|
| 40 |
-
template<class T = void> struct greater_equal;
|
| 41 |
-
template<class T = void> struct less_equal;
|
| 42 |
-
template<> struct equal_to<void>;
|
| 43 |
-
template<> struct not_equal_to<void>;
|
| 44 |
-
template<> struct greater<void>;
|
| 45 |
-
template<> struct less<void>;
|
| 46 |
-
template<> struct greater_equal<void>;
|
| 47 |
-
template<> struct less_equal<void>;
|
| 48 |
|
| 49 |
// [comparisons.three.way], class compare_three_way
|
| 50 |
-
struct compare_three_way;
|
| 51 |
|
| 52 |
// [logical.operations], logical operations
|
| 53 |
-
template<class T = void> struct logical_and;
|
| 54 |
-
template<class T = void> struct logical_or;
|
| 55 |
-
template<class T = void> struct logical_not;
|
| 56 |
-
template<> struct logical_and<void>;
|
| 57 |
-
template<> struct logical_or<void>;
|
| 58 |
-
template<> struct logical_not<void>;
|
| 59 |
|
| 60 |
// [bitwise.operations], bitwise operations
|
| 61 |
-
template<class T = void> struct bit_and;
|
| 62 |
-
template<class T = void> struct bit_or;
|
| 63 |
-
template<class T = void> struct bit_xor;
|
| 64 |
-
template<class T = void> struct bit_not;
|
| 65 |
-
template<> struct bit_and<void>;
|
| 66 |
-
template<> struct bit_or<void>;
|
| 67 |
-
template<> struct bit_xor<void>;
|
| 68 |
-
template<> struct bit_not<void>;
|
| 69 |
|
| 70 |
// [func.identity], identity
|
| 71 |
-
struct identity;
|
| 72 |
|
| 73 |
// [func.not.fn], function template not_fn
|
| 74 |
-
template<class F> constexpr unspecified not_fn(F&& f);
|
| 75 |
|
| 76 |
-
// [func.bind.
|
| 77 |
-
template<class F, class... Args>
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
// [func.bind], bind
|
| 80 |
-
template<class T> struct is_bind_expression;
|
| 81 |
template<class T>
|
| 82 |
-
|
| 83 |
-
|
|
|
|
| 84 |
template<class T>
|
| 85 |
-
|
|
|
|
| 86 |
|
| 87 |
template<class F, class... BoundArgs>
|
| 88 |
-
constexpr unspecified bind(F&&, BoundArgs&&...);
|
| 89 |
template<class R, class F, class... BoundArgs>
|
| 90 |
-
constexpr unspecified bind(F&&, BoundArgs&&...);
|
| 91 |
|
| 92 |
namespace placeholders {
|
| 93 |
// M is the implementation-defined number of placeholders
|
| 94 |
-
see belownc _1;
|
| 95 |
-
see belownc _2;
|
| 96 |
.
|
| 97 |
.
|
| 98 |
.
|
| 99 |
-
see belownc _M;
|
| 100 |
}
|
| 101 |
|
| 102 |
// [func.memfn], member function adaptors
|
| 103 |
template<class R, class T>
|
| 104 |
-
constexpr unspecified mem_fn(R T::*) noexcept;
|
| 105 |
|
| 106 |
// [func.wrap], polymorphic function wrappers
|
| 107 |
class bad_function_call;
|
| 108 |
|
| 109 |
template<class> class function; // not defined
|
| 110 |
template<class R, class... ArgTypes> class function<R(ArgTypes...)>;
|
| 111 |
|
|
|
|
| 112 |
template<class R, class... ArgTypes>
|
| 113 |
void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&) noexcept;
|
| 114 |
|
|
|
|
| 115 |
template<class R, class... ArgTypes>
|
| 116 |
bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
// [func.search], searchers
|
| 119 |
-
template<class
|
| 120 |
-
class default_searcher;
|
| 121 |
|
| 122 |
template<class RandomAccessIterator,
|
| 123 |
class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>,
|
| 124 |
class BinaryPredicate = equal_to<>>
|
| 125 |
class boyer_moore_searcher;
|
|
@@ -129,20 +156,20 @@ namespace std {
|
|
| 129 |
class BinaryPredicate = equal_to<>>
|
| 130 |
class boyer_moore_horspool_searcher;
|
| 131 |
|
| 132 |
// [unord.hash], class template hash
|
| 133 |
template<class T>
|
| 134 |
-
struct hash;
|
| 135 |
|
| 136 |
namespace ranges {
|
| 137 |
// [range.cmp], concept-constrained comparisons
|
| 138 |
-
struct equal_to;
|
| 139 |
-
struct not_equal_to;
|
| 140 |
-
struct greater;
|
| 141 |
-
struct less;
|
| 142 |
-
struct greater_equal;
|
| 143 |
-
struct less_equal;
|
| 144 |
}
|
| 145 |
}
|
| 146 |
```
|
| 147 |
|
| 148 |
[*Example 1*:
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
// [func.invoke], invoke
|
| 6 |
template<class F, class... Args>
|
| 7 |
+
constexpr invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) // freestanding
|
| 8 |
noexcept(is_nothrow_invocable_v<F, Args...>);
|
| 9 |
|
| 10 |
+
template<class R, class F, class... Args>
|
| 11 |
+
constexpr R invoke_r(F&& f, Args&&... args) // freestanding
|
| 12 |
+
noexcept(is_nothrow_invocable_r_v<R, F, Args...>);
|
| 13 |
+
|
| 14 |
// [refwrap], reference_wrapper
|
| 15 |
+
template<class T> class reference_wrapper; // freestanding
|
| 16 |
|
| 17 |
+
template<class T> constexpr reference_wrapper<T> ref(T&) noexcept; // freestanding
|
| 18 |
+
template<class T> constexpr reference_wrapper<const T> cref(const T&) noexcept; // freestanding
|
| 19 |
+
template<class T> void ref(const T&&) = delete; // freestanding
|
| 20 |
+
template<class T> void cref(const T&&) = delete; // freestanding
|
| 21 |
|
| 22 |
+
template<class T>
|
| 23 |
+
constexpr reference_wrapper<T> ref(reference_wrapper<T>) noexcept; // freestanding
|
| 24 |
+
template<class T>
|
| 25 |
+
constexpr reference_wrapper<const T> cref(reference_wrapper<T>) noexcept; // freestanding
|
| 26 |
+
|
| 27 |
+
// [refwrap.common.ref], common_reference related specializations
|
| 28 |
+
template<class R, class T, template<class> class RQual, template<class> class TQual>
|
| 29 |
+
requires see below
|
| 30 |
+
struct basic_common_reference<R, T, RQual, TQual>;
|
| 31 |
+
|
| 32 |
+
template<class T, class R, template<class> class TQual, template<class> class RQual>
|
| 33 |
+
requires see below
|
| 34 |
+
struct basic_common_reference<T, R, TQual, RQual>;
|
| 35 |
|
| 36 |
// [arithmetic.operations], arithmetic operations
|
| 37 |
+
template<class T = void> struct plus; // freestanding
|
| 38 |
+
template<class T = void> struct minus; // freestanding
|
| 39 |
+
template<class T = void> struct multiplies; // freestanding
|
| 40 |
+
template<class T = void> struct divides; // freestanding
|
| 41 |
+
template<class T = void> struct modulus; // freestanding
|
| 42 |
+
template<class T = void> struct negate; // freestanding
|
| 43 |
+
template<> struct plus<void>; // freestanding
|
| 44 |
+
template<> struct minus<void>; // freestanding
|
| 45 |
+
template<> struct multiplies<void>; // freestanding
|
| 46 |
+
template<> struct divides<void>; // freestanding
|
| 47 |
+
template<> struct modulus<void>; // freestanding
|
| 48 |
+
template<> struct negate<void>; // freestanding
|
| 49 |
|
| 50 |
// [comparisons], comparisons
|
| 51 |
+
template<class T = void> struct equal_to; // freestanding
|
| 52 |
+
template<class T = void> struct not_equal_to; // freestanding
|
| 53 |
+
template<class T = void> struct greater; // freestanding
|
| 54 |
+
template<class T = void> struct less; // freestanding
|
| 55 |
+
template<class T = void> struct greater_equal; // freestanding
|
| 56 |
+
template<class T = void> struct less_equal; // freestanding
|
| 57 |
+
template<> struct equal_to<void>; // freestanding
|
| 58 |
+
template<> struct not_equal_to<void>; // freestanding
|
| 59 |
+
template<> struct greater<void>; // freestanding
|
| 60 |
+
template<> struct less<void>; // freestanding
|
| 61 |
+
template<> struct greater_equal<void>; // freestanding
|
| 62 |
+
template<> struct less_equal<void>; // freestanding
|
| 63 |
|
| 64 |
// [comparisons.three.way], class compare_three_way
|
| 65 |
+
struct compare_three_way; // freestanding
|
| 66 |
|
| 67 |
// [logical.operations], logical operations
|
| 68 |
+
template<class T = void> struct logical_and; // freestanding
|
| 69 |
+
template<class T = void> struct logical_or; // freestanding
|
| 70 |
+
template<class T = void> struct logical_not; // freestanding
|
| 71 |
+
template<> struct logical_and<void>; // freestanding
|
| 72 |
+
template<> struct logical_or<void>; // freestanding
|
| 73 |
+
template<> struct logical_not<void>; // freestanding
|
| 74 |
|
| 75 |
// [bitwise.operations], bitwise operations
|
| 76 |
+
template<class T = void> struct bit_and; // freestanding
|
| 77 |
+
template<class T = void> struct bit_or; // freestanding
|
| 78 |
+
template<class T = void> struct bit_xor; // freestanding
|
| 79 |
+
template<class T = void> struct bit_not; // freestanding
|
| 80 |
+
template<> struct bit_and<void>; // freestanding
|
| 81 |
+
template<> struct bit_or<void>; // freestanding
|
| 82 |
+
template<> struct bit_xor<void>; // freestanding
|
| 83 |
+
template<> struct bit_not<void>; // freestanding
|
| 84 |
|
| 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
|
| 101 |
+
is_bind_expression<T>::value;
|
| 102 |
+
template<class T> struct is_placeholder; // freestanding
|
| 103 |
template<class T>
|
| 104 |
+
constexpr int is_placeholder_v = // freestanding
|
| 105 |
+
is_placeholder<T>::value;
|
| 106 |
|
| 107 |
template<class F, class... BoundArgs>
|
| 108 |
+
constexpr unspecified bind(F&&, BoundArgs&&...); // freestanding
|
| 109 |
template<class R, class F, class... BoundArgs>
|
| 110 |
+
constexpr unspecified bind(F&&, BoundArgs&&...); // freestanding
|
| 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 only wrapper
|
| 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,
|
| 150 |
class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>,
|
| 151 |
class BinaryPredicate = equal_to<>>
|
| 152 |
class boyer_moore_searcher;
|
|
|
|
| 156 |
class BinaryPredicate = equal_to<>>
|
| 157 |
class boyer_moore_horspool_searcher;
|
| 158 |
|
| 159 |
// [unord.hash], class template hash
|
| 160 |
template<class T>
|
| 161 |
+
struct hash; // freestanding
|
| 162 |
|
| 163 |
namespace ranges {
|
| 164 |
// [range.cmp], concept-constrained comparisons
|
| 165 |
+
struct equal_to; // freestanding
|
| 166 |
+
struct not_equal_to; // freestanding
|
| 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*:
|