I am looking for a way to obtain the name of a type, similar to typeid
but for references. According to this page, typeid
removes the reference.
If type is a reference type, the result refers to the referenced type.
I am looking for code similar to
int x = 5;
int & y = x;
wcout << typeid( y ).name();
but whose output is "int &" rather than "int".