|
Boost Users : |
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2005-09-18 06:13:51
Cromwell,
> > AFAIK, there is no mpl::vector_c which can hold
> > string literals. Or is it?
>
> MPL vectors can hold characters, e.g.:
>
> typedef
>
mpl::vector_c<char,'h','e','l','l','o','w','o','r','l','d'>
> pseudo_string_literal_0;
>
> Then you can nest MPL vectors, like this:
>
> typedef mpl::vector< pseudo_string_literal_0, ... >
> pseudo_string_vector;
>
> Then write an STL UnaryFunction to output the
> characters of each pseudo_string_literal. Finally,
> put it all together with mpl::for_each<>.
Yeap. But this does not fit into my needs. I need
something in which I can directly plug string
literals. Something like:
vector_c<const char*, "Foo", "Bar", "Blah", "...">
You know why? 'Cause I do (pre-processor) text
substitution.
> > Any volunteers please?
>
> Sorry, I have time only to give you this brief
> outline. (I'm busy trying to implement some
> advanced
> numeric metafunctions, compile-time rationals, etc.)
So far even you've been so nice. Thanks! :)
TTFN,
--Hossein
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net