https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104672
Bug ID: 104672
Summary: C++ frontend failing when function pointer argument
types contain a parameter pack
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eliphat at sjtu dot edu.cn
Target Milestone: ---
Here are two examples where GCC 11.2 fails but clang and msvc works:
```cpp
void test(int a, int* b) {
*b = a;
}
template<typename ...argT>
inline void test_template(
void (*func)(argT..., int*)
) {}
int main() {
test_template<int>(test);
}
```
```cpp
void test(int a, int* b) {
*b = a;
}
template<typename ...argT>
using FuncT = void (*)(argT..., int*);
template<typename ...argT>
inline void test_template(
FuncT<argT...> func
) {}
int main() {
FuncT<int> test_func = test;
test_template<int>(test_func);
}
```