Boost logo

Boost :

From: Jesse Booher (jbooher_at_[hidden])
Date: 2004-03-04 09:14:51


>>> hurdm_at_[hidden] 03/03/04 10:30PM >>>
>> Even the "why not" version seems overly complex compared to a console
>> iostreams "Hello, world". Why not just:
>>
>> winout << title("Example window") << button("Hello, world!")
>> << wait_for(delete_signal);
>>
>> I'm not necessarily pushing that exact approach, but just pointing out
>> more
>> C++-like alternatives.
>
> I understand you're not pushing that approach. It couldn't quite work
> like that as you're trying to structure a tree rather than a sequence.

Not that I'm pushing the approach either, but if all your objects that can be parents have an insertion operator then building a tree is simple a matter of adding parentheses:
tree << a << b << © << d << e << (f << g) );
or breaking it up
f << g;
c << d << e << f;
tree << a << b << c;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk