Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2004-07-10 16:53:53


On 7/9/04 5:40 PM, "Andrei Alexandrescu (See Website for Email)"
<andrewalex_at_[hidden]> wrote:

> "Daryle Walker" <darylew_at_[hidden]> wrote in message
> news:BD1483E4.C2DD%darylew_at_hotmail.com...
>> On 7/7/04 12:08 PM, "Andrei Alexandrescu (See Website for Email)"
>> <andrewalex_at_[hidden]> wrote:
[SNIP]
>>> I see. So I'd like to make a quick poll for Boosters: Overloading the comma
>>> operator in a way that could change order of evaluation of its arguments is:
>>>
>>> a) an obsolete coding standard
>>> b) a valid coding standard
>>> c) a valid coding standard, but for reasons x, y, and z, the initialization
>>> library doesn't violate it/violates it but gets away with it/etc.
>>
>> I don't understand what the extra descriptions in [c] mean. How does [c]
>> differ from [b]?
>
> [b] implies that the initialization library is in violation of that coding
> standard. [c] implies that the initialization library has reasons that makes
> it exempt from that coding standard.
>
>> Also, the initial question is badly formed. It implies that there is a
>> method of overloading the comma operator _without_ making argument
>> evaluation order arbitrary. There isn't. (It's either using the built-in
>> operator in list order, or an user-defined version in arbitrary order.)
>
> There is: expression templates.

How can expression templates re-instate evaluation order? (Note: I'm a
newbie at expression templates.)

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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