Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdc90c30

Browse files
authored
Merge pull request#1068 from NVIDIA/fix-basic-sender-lambda-return-type
replace deduced return type in the `__basic_sender` lambda with a `decltype`
2 parents6c7d942 +a71cdaf commitdc90c30

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎include/stdexec/__detail/__sender_utils.hpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,20 @@ namespace stdexec {
159159
}
160160
};
161161

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+
162168
// Anonymous namespace here is to avoid symbol name collisions with the
163169
// lambda functions returned by __make_tuple.
164170
namespace {
165171
constexprauto __make_tuple =//
166172
[]<class_Tag,class... _Captures>(_Tag, _Captures&&... __captures) {
167173
return [=]<class_Cvref,class_Fun>(_Cvref __cvref, _Fun && __fun)mutable//
168174
noexcept(__nothrow_callable<_Fun, _Tag, __minvoke<_Captures, _Cvref>...>)//
169-
->decltype(auto)//
175+
->decltype(__f<__call_result_t<_Fun, _Tag, __minvoke<_Captures, _Cvref>...>>())
170176
requires __callable<_Fun, _Tag, __minvoke<_Captures, _Cvref>...>
171177
{
172178
return ((_Fun&&) __fun)(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp