Variadic class template and inheritance - default compiler generated constructor

Viewed 185

How come the below code works w/ just the default compiler generated constructor? I would expect it for POD but the struct below is probably not a POD so it must be something else.

template <typename ... T>
struct C : T ... {
   using T::operator()...;
};

// template class guidance feature of C++17
template <typename ... T>
C(T...) -> C<T...>;

int main(){
   C c { []{}, [](int){} };
   c(3);
}

This question comes as a follow up to Jason's Turner C++ weekly ep 49/50 where he defined a variadic constructor with std::forward<T>(t)...

1 Answers
Related