Skip to content

Commit 26d8565

Browse files
Ensure __decay builtin is not part of function signatures. (#1439)
--------- Co-authored-by: Eric Niebler <[email protected]>
1 parent 999a11e commit 26d8565

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

include/stdexec/__detail/__type_traits.hpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,18 @@ namespace stdexec {
3030
// __decay_t: An efficient implementation for std::decay
3131
#if STDEXEC_HAS_BUILTIN(__decay)
3232

33+
namespace __tt {
34+
template <class>
35+
struct __wrap;
36+
37+
template <bool>
38+
struct __decay_ {
39+
template <class _Ty>
40+
using __f = __decay(_Ty);
41+
};
42+
} // namespace __tt
3343
template <class _Ty>
34-
using __decay_t = __decay(_Ty);
44+
using __decay_t = typename __tt::__decay_<sizeof(__tt::__wrap<_Ty>*) == ~0ul>::template __f<_Ty>;
3545

3646
#elif STDEXEC_EDG()
3747

0 commit comments

Comments
 (0)