One additional issue. If I pass in a class type:

template< typename t_type >
void to_string()
{
    return typeid( t_type ).name();
}

to_string<CFooClass>();

Output yields:

"class CFooClass"

I expected just:

"CFooClass"

On 11/5/07, Olivier Tournaire <olitour@gmail.com > wrote:
Maybe you can try with typeid(t_type).name(), included in <typeinfo>.

Regards,

Olivier

2007/11/5, Robert Dailey <rcdailey@gmail.com >:
Hi,

As you know, with Microsoft VS preprocessor operators you can convert a type passed in to a macro to a string. For example:

#define TO_STRING( type ) #type

I would like to do the same thing with a template type:

template< typename t_type >
void TO_STRING()
{
  // Do something here with t_type to make it a string and then return it
}

Is there something in boost that can facilitate the behavior I'm describing? Thanks.

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Le temps des cerises reviendra. Dans l'immédiat, c'est le temps des noyaux. Courage.

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users