|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2001-06-01 05:11:00
Joel de Guzman wrote:
>> Actually, *this* code can be made to work. Blitz library uses this syntax
for
>> array assigments.
>> Array<int> a;
>> a = 1, 2, 3, 4, 5;
>> This is acomplished by making operator= return special object. This is not
>> likely to work in case of initialzation, anyway.
>> --
>but still:
> a, b | c
>will be
> a, (b | c)
>and not what we want:
> (a, b) | c
> Gosh if you could make that work, I want that!
I think that it is possible to write a metaprogram that will take a general
expression tree and reparse it assuming whatever precedece you like.
This is not easily done, though. I actually think that we need some
metalanguage, most likely functional, which will be mapped to template
metaprograms. But this is not easily done as well.
-- Regards, Vladimir
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk