gcc 编译器是否还有一个与继承的构造函数相关的错误?
Is there one more bug of the gcc compiler relative to inherited constructors?
此代码不使用 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'
此代码不使用 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'