C++ image template

xrax

Senior member
Sep 17, 2005
341
0
0
In ADA you can do something like Text.Io(VarName'Image); and that will print VarName.
Is there a template/function available in C++ to do the same thing? something like.std::string name=varinfo(VarName).image();
I know there is typeid(var).name().
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Never seen one - and would love one.

In ADA it is part of the compiler language. Unchecked conversion are also required a lot of times

In C, you would need a preparser that would retain such info similar to the way a debugger handles it.