Boost logo

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
>> 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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at