Here's an alternative (borrowing ideas from Daniel Frey's solution) using a function template rather than a class template:
template <template<typename...> class C, typename R, typename... Args>
C<Args...> apply_args(R(Args...));
void f(int, bool);
using MyPair = decltype(apply_args<std::pair>(f)); // = std::pair<int, bool>
MyPair myPair{42, false};
Edit: Comments on my solution x Daniel Frey's:
Mine saves typing. His is more idiomatic. Indeed, in C++ metaprogramming a
"function" (or a meta-function) that takes types and return a type is
(generally) implemented as a template classe whose member type
gives the
return. For this reason, I prefer his solution.