[cpp-threads] Static member functions, member access syntax and sequenced-before

Peter Dimov pdimov at mmltd.net
Wed Nov 23 22:06:05 GMT 2011


N.M. Maclaren wrote:

> You have missed out one essential step, which is the point I am raising.
>
> requests[0] is evaluated, and let's assume that it is a value computation.
> However, the actual value is NOT used in the 'evaluation' of
> requests[0].Waitall, because that is done by member name lookup on the
> class (i.e. the type of the value, and not the actual value).

Nevertheless, the function call is sequenced after this value computation. 
There is no text that allows it not to be, if its value is not used.

To give you a crude analogy, in

    f( 0 * g() );

the value of g() is not used in the call to f(), but it's still sequenced 
before it. There is no special case in the wording that allows 
sequenced-before to not apply if a value is not used. 




More information about the cpp-threads mailing list