[Bug c++/115809] paramater packed of function argument inside decltype of trailing return type is rejected
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 6 23:24:06 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115809
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Gcc can't parse code where |paramater packed of
|the decltype is written, |function argument inside
|which depends on the |decltype of trailing return
|runtime arguments passed to |type is rejected
|the function. |
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note it is the decltype for the trailing return type that is causing the issue.
That is this works just fine:
```
template <int...>
void Foo() {};
template<typename ...T>
void Foo3(T... is) {
return (decltype(Foo<is...>()))0;
};
void f()
{
Foo3();
}
```
More information about the Gcc-bugs
mailing list