Subject: Re: [boost] [property] interest in C# like properties for C++?
From: Matthew Chambers (matthew.chambers_at_[hidden])
Date: 2009-10-21 16:52:51
Stewart, Robert wrote:
>>> . This means that it can't be used in a chain of assignment
>>> operations like A.X(B.X(5)) which incidentally looks awful
>>> compared to A.X = B.X = 5.
> A.X() = B.X() = 5 isn't horrible, but A.X = B.X = 5 is what one expects when one thinks of "properties."
A.X() and B.X() are the getters, not the setters, although I appreciate
that they could return non-const references so they could be used like
you wrote. But even these semantics do not conform with Stefan's notion
of de facto "standard C++ properties."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk