Re: [boost] Geometry/Vector Lib

6 Oct
2006
6 Oct
'06
8:38 p.m.
In-Reply-To: <eg3csg$jm9$1@sea.gmane.org> andy@servocomm.freeserve.co.uk (Andy Little) wrote (abridged):
Why not :
at_x(vec)
If we don't mind the syntactic clutter of the function call, we can use vec.x(). double vector::x() const { return data[0]; } double vector::y() const { return data[1]; } This ought to have the runtime efficiency of vec.x while still hiding the internal representation, and supporting indexed access without undefined behaviour. The only argument I can see against it is that some people don't want to have to type the brackets. -- Dave Harris, Nottingham, UK.
6824
Age (days ago)
6824
Last active (days ago)
0 comments
1 participants
participants (1)
-
brangdon@cix.compulink.co.uk