I want to deduce the template arguments of an aliased class template and Richard Smith says that should work in C++20.
If my alias is just a name-change, then this answer to a related question works with C++20:
template <typename T> struct Bar { Bar(T); };
template <typename T> using Foo = Bar;
template <typename T> Bar(T) -> Bar<T>; // decuction guide here
Foo f{42};
However, my alias is not just a simple name-change, but something more involved, for the sake of argument, let’s say:
template <typename T> struct Bar { Bar(T); };
template <typename T> using BarVec = std::vector<Bar<T>>;
// how to tell the compiler that BarVec(int) should construct an std::vector<Bar<int>>?
// maybe like this?
template <typename T> BarVec(int) -> BarVec<int>;
// NO, compiler says: "expected unqualified-id before 'int'" (what does that even mean?)
// maybe resolving the alias like this?
template <typename T> std::vector<Bar<T>>(int) -> std::vector<Bar<int>>;
// NO, compiler says: "invalid declarator before '(' token" (what does that even mean?)
BarVec bv{42};
See my attempts in inline comments. Play with it here.