Boost logo

Boost :

Subject: Re: [boost] [mpl] string to type conversion
From: Philippe Vaucher (philippe.vaucher_at_[hidden])
Date: 2010-05-13 05:17:03


> I would like to have a macro which could be used like this:
>
> STRING_TO_TYPE( MyType )
>
> which would yield:
>
> typedef mpl::string<'M','y','T','y','p','e'> MyType_id_t;
>

AFAIK it's impossible. The preprocessor can only concatenate strings, not
split them.

Philippe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk