You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
../../../include/cpp2util.h:2891:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here
95
+
../../../include/cpp2util.h:2923:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here
96
96
if constexpr (is_narrowing_v<C, CPP2_TYPEOF(x)>) {
97
97
^
98
98
pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_<int, double (&)(double) noexcept>' requested here
99
99
auto val1 {cpp2::impl::as_<int>(ex1)};
100
100
^
101
101
In file included from pure2-expected-is-as.cpp:7:
102
-
../../../include/cpp2util.h:2892:9: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee<int, double (double) noexcept>': 'as' does not allow unsafe possibly-lossy narrowing conversions - if you're sure you want this, use 'unchecked_narrow<T>' to explicitly force the conversion and possibly lose information
102
+
../../../include/cpp2util.h:2924:9: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee<int, double (double) noexcept>': 'as' does not allow unsafe possibly-lossy narrowing conversions - if you're sure you want this, use 'unchecked_narrow<T>' to explicitly force the conversion and possibly lose information
103
103
static_assert(
104
104
^
105
105
pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_<int, double (&)(double) noexcept>' requested here
106
106
auto val1 {cpp2::impl::as_<int>(ex1)};
107
107
^
108
108
In file included from pure2-expected-is-as.cpp:7:
109
-
../../../include/cpp2util.h:2904:52: error: no matching function for call to 'as'
109
+
../../../include/cpp2util.h:2936:52: error: no matching function for call to 'as'
110
110
else if constexpr( std::is_same_v< CPP2_TYPEOF(as<C>(CPP2_FORWARD(x))), nonesuch_ > ) {
111
111
^~~~~
112
-
../../../include/cpp2util.h:315:66: note: expanded from macro 'CPP2_TYPEOF'
112
+
../../../include/cpp2util.h:317:66: note: expanded from macro 'CPP2_TYPEOF'
../../../include/cpp2util.h:1845:17: note: and 'std::is_floating_point_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
121
+
../../../include/cpp2util.h:1908:17: note: and 'std::is_floating_point_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
122
122
|| std::is_floating_point_v<CPP2_TYPEOF(x)>
123
123
^
124
-
../../../include/cpp2util.h:1846:17: note: and 'std::is_base_of_v<int, std::remove_cvref_t<decltype(x)> >' evaluated to false
124
+
../../../include/cpp2util.h:1909:17: note: and 'std::is_base_of_v<int, std::remove_cvref_t<decltype(x)> >' evaluated to false
125
125
|| std::is_base_of_v<C, CPP2_TYPEOF(x)>
126
126
^
127
-
../../../include/cpp2util.h:1847:17: note: and 'std::is_base_of_v<std::remove_cvref_t<decltype(x)>, int>' evaluated to false
127
+
../../../include/cpp2util.h:1910:17: note: and 'std::is_base_of_v<std::remove_cvref_t<decltype(x)>, int>' evaluated to false
128
128
|| std::is_base_of_v<CPP2_TYPEOF(x), C>
129
129
^
130
-
../../../include/cpp2util.h:1848:30: note: and 'C{std::forward<decltype(x)>(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept'
130
+
../../../include/cpp2util.h:1911:30: note: and 'C{std::forward<decltype(x)>(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept'
131
131
|| requires { C{CPP2_FORWARD(x)}; }
132
132
^
133
-
../../../include/cpp2util.h:325:37: note: expanded from macro 'CPP2_FORWARD'
133
+
../../../include/cpp2util.h:327:37: note: expanded from macro 'CPP2_FORWARD'
../../../include/cpp2util.h:1977:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept]
136
+
../../../include/cpp2util.h:2040:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept]
137
137
auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto)
138
138
^
139
-
../../../include/cpp2util.h:1976:23: note: because 'specialization_of_template<double (&)(double) noexcept, std::variant>' evaluated to false
139
+
../../../include/cpp2util.h:2039:23: note: because 'specialization_of_template<double (&)(double) noexcept, std::variant>' evaluated to false
140
140
template< typename C, specialization_of_template<std::variant> X >
141
141
^
142
-
../../../include/cpp2util.h:724:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
142
+
../../../include/cpp2util.h:891:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:63:9: note: because '__detail::__same_as<double (double) noexcept, std::any>' evaluated to false
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:57:27: note: because 'std::is_same_v<double (double) noexcept, std::any>' evaluated to false
158
158
concept __same_as = std::is_same_v<_Tp, _Up>;
159
159
^
160
-
../../../include/cpp2util.h:2069:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
160
+
../../../include/cpp2util.h:2130:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
161
161
constexpr auto as( X&& x ) -> decltype(auto) {
162
162
^
163
-
../../../include/cpp2util.h:2068:22: note: because 'specialization_of_template<double (&)(double) noexcept, std::optional>' evaluated to false
163
+
../../../include/cpp2util.h:2129:22: note: because 'specialization_of_template<double (&)(double) noexcept, std::optional>' evaluated to false
../../../include/cpp2util.h:724:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
166
+
../../../include/cpp2util.h:891:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
../../../include/cpp2util.h:1813:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
169
+
../../../include/cpp2util.h:1876:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
170
170
constexpr auto as() -> auto
171
171
^
172
-
../../../include/cpp2util.h:1824:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
172
+
../../../include/cpp2util.h:1887:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
173
173
constexpr auto as() -> auto
174
174
^
175
-
../../../include/cpp2util.h:2905:9: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee<int, double (double) noexcept>': No safe 'as' cast available - please check your cast
175
+
../../../include/cpp2util.h:2937:9: error: static assertion failed due to requirement 'program_violates_type_safety_guarantee<int, double (double) noexcept>': No safe 'as' cast available - please check your cast
176
176
static_assert(
177
177
^
178
-
../../../include/cpp2util.h:2911:12: error: no matching function for call to 'as'
178
+
../../../include/cpp2util.h:2943:12: error: no matching function for call to 'as'
179
179
return as<C>(CPP2_FORWARD(x));
180
180
^~~~~
181
-
../../../include/cpp2util.h:1838:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept]
181
+
../../../include/cpp2util.h:1901:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept]
182
182
constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto)
183
183
^
184
-
../../../include/cpp2util.h:1844:18: note: because 'std::is_scalar_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
184
+
../../../include/cpp2util.h:1907:18: note: because 'std::is_scalar_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
../../../include/cpp2util.h:1845:17: note: and 'std::is_floating_point_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
187
+
../../../include/cpp2util.h:1908:17: note: and 'std::is_floating_point_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
188
188
|| std::is_floating_point_v<CPP2_TYPEOF(x)>
189
189
^
190
-
../../../include/cpp2util.h:1846:17: note: and 'std::is_base_of_v<int, std::remove_cvref_t<decltype(x)> >' evaluated to false
190
+
../../../include/cpp2util.h:1909:17: note: and 'std::is_base_of_v<int, std::remove_cvref_t<decltype(x)> >' evaluated to false
191
191
|| std::is_base_of_v<C, CPP2_TYPEOF(x)>
192
192
^
193
-
../../../include/cpp2util.h:1847:17: note: and 'std::is_base_of_v<std::remove_cvref_t<decltype(x)>, int>' evaluated to false
193
+
../../../include/cpp2util.h:1910:17: note: and 'std::is_base_of_v<std::remove_cvref_t<decltype(x)>, int>' evaluated to false
194
194
|| std::is_base_of_v<CPP2_TYPEOF(x), C>
195
195
^
196
-
../../../include/cpp2util.h:1848:30: note: and 'C{std::forward<decltype(x)>(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept'
196
+
../../../include/cpp2util.h:1911:30: note: and 'C{std::forward<decltype(x)>(x)}' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept'
197
197
|| requires { C{CPP2_FORWARD(x)}; }
198
198
^
199
-
../../../include/cpp2util.h:325:37: note: expanded from macro 'CPP2_FORWARD'
199
+
../../../include/cpp2util.h:327:37: note: expanded from macro 'CPP2_FORWARD'
../../../include/cpp2util.h:1977:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept]
202
+
../../../include/cpp2util.h:2040:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept]
203
203
auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto)
204
204
^
205
-
../../../include/cpp2util.h:1976:23: note: because 'specialization_of_template<double (&)(double) noexcept, std::variant>' evaluated to false
205
+
../../../include/cpp2util.h:2039:23: note: because 'specialization_of_template<double (&)(double) noexcept, std::variant>' evaluated to false
206
206
template< typename C, specialization_of_template<std::variant> X >
207
207
^
208
-
../../../include/cpp2util.h:724:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
208
+
../../../include/cpp2util.h:891:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:63:9: note: because '__detail::__same_as<double (double) noexcept, std::any>' evaluated to false
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/concepts:57:27: note: because 'std::is_same_v<double (double) noexcept, std::any>' evaluated to false
224
224
concept __same_as = std::is_same_v<_Tp, _Up>;
225
225
^
226
-
../../../include/cpp2util.h:2069:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
226
+
../../../include/cpp2util.h:2130:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
227
227
constexpr auto as( X&& x ) -> decltype(auto) {
228
228
^
229
-
../../../include/cpp2util.h:2068:22: note: because 'specialization_of_template<double (&)(double) noexcept, std::optional>' evaluated to false
229
+
../../../include/cpp2util.h:2129:22: note: because 'specialization_of_template<double (&)(double) noexcept, std::optional>' evaluated to false
../../../include/cpp2util.h:724:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
232
+
../../../include/cpp2util.h:891:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
0 commit comments