From Jason Turner

[functional.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp24tip1h7/{from.md → to.md} +33 -23
tmp/tmp24tip1h7/{from.md → to.md} RENAMED
@@ -2,23 +2,23 @@
2
 
3
  ``` cpp
4
  namespace std {
5
  // [func.invoke], invoke
6
  template<class F, class... Args>
7
- 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> reference_wrapper<T> ref(T&) noexcept;
14
- template <class T> 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> reference_wrapper<T> ref(reference_wrapper<T>) noexcept;
19
- template <class T> reference_wrapper<const T> cref(reference_wrapper<T>) noexcept;
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;
@@ -44,10 +44,13 @@ namespace std {
44
  template<> struct greater<void>;
45
  template<> struct less<void>;
46
  template<> struct greater_equal<void>;
47
  template<> struct less_equal<void>;
48
 
 
 
 
49
  // [logical.operations], logical operations
50
  template<class T = void> struct logical_and;
51
  template<class T = void> struct logical_or;
52
  template<class T = void> struct logical_not;
53
  template<> struct logical_and<void>;
@@ -62,22 +65,31 @@ namespace std {
62
  template<> struct bit_and<void>;
63
  template<> struct bit_or<void>;
64
  template<> struct bit_xor<void>;
65
  template<> struct bit_not<void>;
66
 
67
- // [func.not_fn], function template not_fn
68
- template <class F>
69
- unspecified not_fn(F&& f);
 
 
 
 
 
70
 
71
  // [func.bind], bind
72
  template<class T> struct is_bind_expression;
 
 
73
  template<class T> struct is_placeholder;
 
 
74
 
75
  template<class F, class... BoundArgs>
76
- unspecified bind(F&&, BoundArgs&&...);
77
  template<class R, class F, class... BoundArgs>
78
- unspecified bind(F&&, BoundArgs&&...);
79
 
80
  namespace placeholders {
81
  // M is the implementation-defined number of placeholders
82
  see belownc _1;
83
  see belownc _2;
@@ -87,11 +99,11 @@ namespace std {
87
  see belownc _M;
88
  }
89
 
90
  // [func.memfn], member function adaptors
91
  template<class R, class T>
92
- unspecified mem_fn(R T::*) noexcept;
93
 
94
  // [func.wrap], polymorphic function wrappers
95
  class bad_function_call;
96
 
97
  template<class> class function; // not defined
@@ -100,16 +112,10 @@ namespace std {
100
  template<class R, class... ArgTypes>
101
  void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&) noexcept;
102
 
103
  template<class R, class... ArgTypes>
104
  bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
105
- template<class R, class... ArgTypes>
106
- bool operator==(nullptr_t, const function<R(ArgTypes...)>&) noexcept;
107
- template<class R, class... ArgTypes>
108
- bool operator!=(const function<R(ArgTypes...)>&, nullptr_t) noexcept;
109
- template<class R, class... ArgTypes>
110
- bool operator!=(nullptr_t, const function<R(ArgTypes...)>&) noexcept;
111
 
112
  // [func.search], searchers
113
  template<class ForwardIterator, class BinaryPredicate = equal_to<>>
114
  class default_searcher;
115
 
@@ -121,19 +127,23 @@ namespace std {
121
  template<class RandomAccessIterator,
122
  class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>,
123
  class BinaryPredicate = equal_to<>>
124
  class boyer_moore_horspool_searcher;
125
 
126
- // [unord.hash], hash function primary template
127
  template<class T>
128
  struct hash;
129
 
130
- // [func.bind], function object binders
131
- template <class T>
132
- inline constexpr bool is_bind_expression_v = is_bind_expression<T>::value;
133
- template <class T>
134
- inline constexpr int is_placeholder_v = is_placeholder<T>::value;
 
 
 
 
135
  }
136
  ```
137
 
138
  [*Example 1*:
139
 
 
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> constexpr reference_wrapper<T> ref(reference_wrapper<T>) noexcept;
19
+ template<class T> constexpr reference_wrapper<const T> cref(reference_wrapper<T>) noexcept;
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;
 
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>;
 
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.front], function template bind_front
77
+ template<class F, class... Args> constexpr unspecified bind_front(F&&, Args&&...);
78
 
79
  // [func.bind], bind
80
  template<class T> struct is_bind_expression;
81
+ template<class T>
82
+ inline constexpr bool is_bind_expression_v = is_bind_expression<T>::value;
83
  template<class T> struct is_placeholder;
84
+ template<class T>
85
+ inline constexpr int is_placeholder_v = is_placeholder<T>::value;
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;
 
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
 
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 ForwardIterator, class BinaryPredicate = equal_to<>>
120
  class default_searcher;
121
 
 
127
  template<class RandomAccessIterator,
128
  class Hash = hash<typename iterator_traits<RandomAccessIterator>::value_type>,
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*:
149