Boost logo

Boost :

From: Jared McIntyre (jmcintyre_at_[hidden])
Date: 2007-04-24 17:07:37

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:


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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at