|
Boost : |
Subject: Re: [boost] Preview 3 of the Geometry Library
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2008-10-21 15:03:51
Simonson, Lucanus J wrote:
> Also, your get function returns a reference to coordinate. It should
> return by value. Many legacy point types may have a public API that
> prohibits direct access to their members because that is what good
> little C++ programmers were taught to do in school. Those point classes
> could not conform to your concept.
This is not a problem, you just have to write a proxy.
That kind of thing is done very often to achieve operator[] overloading
with different semantics for reads and writes. It's also done a lot for
iterators, which also return references.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk