Can I use user-defined deduction guides for classes with multiple template parameter? I want that one specified template parameter gets deduced from the constructor argument. All other template parameters must be specified in the <>
-bracket when constructing a class. Example:
#include <iostream>
template<typename T, typename A>
struct Hello
{
Hello(T x) : x(x) {}
T x;
A y;
};
Hello<A>(int) -> Hello<int, A>; // This is not a valid syntax but shows what i want to do
int main()
{
Hello h = Hello<float>((int)1); // this should be deduced to Hello<int, float>
std::cout << h.x << std::endl;
return 0;
}