(Im)perfect forwarding with variadic templates
问题 Synopsis Given a type with a variadic template constructor that forwards the arguments to an implementation class, is it possible to restrict the types being forwarded with SFINAE? Details First, consider the non-variadic case with a constructor taking a universal reference. Here one can disable forwarding of a non-const lvalue reference via SFINAE to use the copy constructor instead. struct foo { foo() = default; foo(foo const&) { std::cout << "copy" << std::endl; } template < typename T,