
24 Apr
2007
24 Apr
'07
9:07 p.m.
I have need of a library that converts a compile time type to a string. For example: namespace testNamespace { struct aStruct{}; } void main() { std::cout << TypeString<int>::str() << std::endl; std::cout << TypeString<aStruct>::str() << std::endl; } would output: int testNamespace::aStruct I have been playing around with code that does this, but I wanted to make sure I wasn't duplicating any work that someone else has already done. I looked through the boost sandbox, but didn't find anything. Am I missing something? If not, is this something that there would be interested in having? Clearly it would be compiler dependent but I know I can get it to work on Visual Studio and I think I could do it with gcc. Jared