Fei Liu wrote:
> Adrian Hawryluk wrote:
>> Does anyone know of a way to manipulate a macro list to remove either
>> the beginning or the end element? I.e. Given:
>>
>> #define ELEMENTS EL(1) EL(2) EL(3)
>>
>> Is there any manipulation to get just EL(1) EL(2) out of ELEMENTS?
>>
>> Thanks for your help.
>>
>>
>> Adrian
> The real question is why you need do something like that? How about:
>
> #define ELEMENTS EL(1) EL(2) EL(3)
> #define FIRST_2_ELEMENTS EL(1) EL(2)
The reason is for writing recursively defined template code. mlimber
gave me what I needed. The boost preprocessor library was something
that I was going to have to (in some capacity) implement if I didn't
know about it. Though I was /almost/ ok without it, this will simplify
things considerably.
Thanks all,
Adrian
--
_____________________________________________________________________
\/Adrian_Hawryluk BSc. - Specialties: UML, OOPD, Real-Time Systems\/
\ _---_ Q. What are you doing here? _---_ /
\ / | A. Just surf'n the net, teaching and | \ /
\__/___\___ learning, learning and teaching. You?_____/___\__/
\/______[blog:__http://adrians-musings.blogspot.com/]______\/