此代码不使用 gcc HEAD 10.0.0 20190 编译,而是使用 clang HEAD 9.0.0 编译
#include <iostream>
struct A
{
A() = default;
A( int ) {}
};
struct B
{
B() = default;
B( const char * ) {}
};
template <typename...Bases>
struct C : Bases...
{
using Bases::Bases...;
};
int main()
{
}
错误是
rog.cc:18:23: error: parameter packs not expanded with '...':
18 | using Bases::Bases...;
| ^~~
prog.cc:18:23: note: 'Bases'