Re: [Boost-users] [preprocessor] break "names"
Hi,
Not a naive question, check this:
http://lists.boost.org/Archives/boost/2005/03/83253.php
Regards,
József Mihalicza
________________________________
Feladó: boost-users-bounces@lists.boost.org meghatalmazó: Felipe Magno de Almeida
Hi,
Maybe it is a naive question, but I've been researching a little and
couldnt find an answer to this(not an affirmative and nor negative):
Is it possible to have such usages:
SOME_MACRO(hello world)
or
SOME_MACRO("hello world")
(or something that doesnt have much "characters overhead", like using
space for every character)
and have the expansion result in this:
h e l l o w o r l d
or even better:
'h','e','l','l','o', ' ', 'w', 'o', 'r', 'l', 'd'
Well, what I'm trying to find is if it is possible to give something
to a macro and the macro create an vector_c with all the characters
inside it.
Like:
SOME_MACRO(Hello World)
and expand to:
boost::mpl::vector
On 9/10/05, Mihalicza, Jozsef
Hi,
Not a naive question, check this: http://lists.boost.org/Archives/boost/2005/03/83253.php
Could you say if I understood the code correctly? This code only "translates string of words into string of characters" for the words registered. Is that right? I dont know if that fits very well to me... One more thing, what is this chaos library? Never heard about it. Thanks for the attention, Felipe.
Regards, József Mihalicza
-- Felipe Magno de Almeida Developer from synergy and Computer Science student from State University of Campinas(UNICAMP). Unicamp: http://www.ic.unicamp.br Synergy: http://www.synergy.com.br "There is no dark side of the moon really. Matter of fact it's all dark."
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Felipe Magno de Almeida
Not a naive question, check this: http://lists.boost.org/Archives/boost/2005/03/83253.php
Could you say if I understood the code correctly? This code only "translates string of words into string of characters" for the words registered.
Yes.
Is that right? I dont know if that fits very well to me...
The best that you can do (realistically) is a string of space-separated letters. The preprocessor cannot break apart arbitrary identifiers into letters, and it cannot deal with punctuators or operators at all.
One more thing, what is this chaos library? Never heard about it.
Chaos is a preprocessor library similar to the Boost Preprocessor Library, but is much more advanced and extensible. However, it isn't portable to broken preprocessors, so it isn't usable on (e.g.) VC. Regards, Paul Mensonides
participants (3)
-
Felipe Magno de Almeida
-
Mihalicza, Jozsef
-
Paul Mensonides