Is there a standard type to untokenize a type? It'd probably be implemented as so:
template<class T>
using untokenize = T;
This way I can perform the following cast using an overloaded operator:
struct x {
int y;
operator int&() {
return y;
}
};
x a;
// int&(a); // doesn't work
// (int&)(a); // not the same thing
untokenize<int&>(a); // works great
Or is there another, more standard way to achieve my goal of avoiding a c-style cast in favor of a function-style cast?