Boost logo

Boost :

From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2006-12-05 00:28:18


On 12/4/06, Michael Marcin <mike_at_[hidden]> wrote:
> How about red.xxxw().data()?

Are we just trying to avoid a temporary being made? Even if we manage
to hide it behind a member function, a temporary of some sort will
still need to be made since it's really a vec4<float &> that's
returned, so there's no special knowledge the class has that will
enable it to implement data() any better than:

float4 white = red.xxxw();

The other option is to remove the write mask functionality and just
return a vec4<float> by value, but I really like being able to specify
write masks.

--Michael Fawcett


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