We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents6c7d942 +a71cdaf commitdc90c30Copy full SHA for dc90c30
include/stdexec/__detail/__sender_utils.hpp
@@ -159,14 +159,20 @@ namespace stdexec {
159
}
160
};
161
162
+// Rather strange definition of the lambda return type below is to reap the
163
+// benefits of SFINAE without nvc++ encoding the whole return type into the
164
+// symbol name.
165
+template<class_Ty>
166
+extern_Ty(*__f)();
167
+
168
// Anonymous namespace here is to avoid symbol name collisions with the
169
// lambda functions returned by __make_tuple.
170
namespace {
171
constexprauto __make_tuple =//
172
[]<class_Tag,class... _Captures>(_Tag, _Captures&&... __captures) {
173
return [=]<class_Cvref,class_Fun>(_Cvref __cvref, _Fun && __fun)mutable//
174
noexcept(__nothrow_callable<_Fun, _Tag, __minvoke<_Captures, _Cvref>...>)//
- ->decltype(auto)//
175
+ ->decltype(__f<__call_result_t<_Fun, _Tag, __minvoke<_Captures, _Cvref>...>>())
176
requires __callable<_Fun, _Tag, __minvoke<_Captures, _Cvref>...>
177
{
178
return ((_Fun&&) __fun)(