In fact, this is possible with some indirectness. The idea is to defer the deduction of the pattern until you have type information.
struct MyClassCtor {
std::string param;
template<int base>
operator MyClass<base>() {
return param;
}
};
MyClassCtor operator "" _G(const char* param, size_t length)
{
return {std::string(param, length)};
}
" Resolver" .
, , auto a = 345_G MyClass<>, , . , , .