Let's say we have a class template Foo, that has one type template parameter that it can deduce from an argument in its constructor. If we use std::make_unique to construct an instance of Foo, is there a way for Foo's constructor to deduce the template arguments as it would have if its constructor was called normally? Is this the simplest way to achieve this?
std::make_unique< decltype(Foo{...}) > (...);
This seems pretty clean but if Foo's constructor takes a lot of arguments it can turn into a pretty ugly line.