Is there some way I can output if the template parameter is an rvalue reference, reference, or constant value? That is, I'm using a universal reference and would, for debugging/learning purposes, like to see exactly which type actually matched.
template<typename T>
void write( T && f ) {
std::cout << typeid(f).name;
}
This of course doesn't show me that it was an rvalue, lvalue, or const parameter which was passed. I would like somehow to display which parameter type was actually matched. Note that I'm specifically interested in seeing how this single function is matched.