我该如何让这段代码编译通过?
struct type1 {};
struct type2 {};
struct handler1
{
void handle(type1){}
};
struct handler2
{
void handle(type2){}
};
template <typename... Handlers>
struct TheHandler : Handlers...
{
using Handlers::handle...; // DOESN'T COMPILE
};
TheHandler<handler1, handler2> handler;
handler.handle(type1());
using
扩展参数包)。作为编译器扩展,它在C++14中也可以工作。 - Justin