Open prlw1 opened 3 months ago
FWIW, there's a GCC bug report related to it (the bug here fixed was an ICE in the compiler), apparently using __decay
is not the way to go.
Cf. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116052
apparently using __decay is not the way to go.
What is the issue with using __decay
builtin?
It seems like the stdlib is fine using it in the definition of the std::decay
struct definition.
template<typename T>
struct decay {
using type = __decay(T);
};
Is there a restriction on the places that such a built-in can be used? i.e. it's ok to use in member-alias-templates of a class definition, but not at namespace-scope-alias-templates.
Having said that, if the compilers/stdlib are now optimizing std::decay_t
then we may as well just use that directly rather than trying to optimize in stdexec code.
Is there a restriction on the places that such a built-in can be used?
Yes, the restriction is that built-ins are not allowed to appear in function signatures. That's what the compilation error is all about. Using the trait that resolves to the built-in in function signatures is fine. Use the trait, don't use the built-in.
My guess is that in
gcc caught up with
include/stdexec/__detail/__type_traits.hpp
End result is my old code fails with
Egregious hack
allows me to compile once again.
Presumably ignore until 15 is released, then test on version?