https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116051
Bug ID: 116051
Summary: inconsistent handling of void typedefs in otherwise
empty parameter lists
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ted at lyncon dot se
Target Milestone: ---
I believe this is related to
https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#577
```
#include <functional>
template <class T>
struct Foo {
using Sig = int(T); // error when T is void: invalid parameter type 'void'
};
int main() {
using T = void;
using Sig = int(T); // no problem
std::function<Sig> func = [] { return 0; }; // still no problem
[[maybe_unused]] Foo<int> f1; // no problem
[[maybe_unused]] Foo<void> f2; // error, see above
return func();
}
```