|
Boost : |
From: jsiek_at_[hidden]
Date: 2000-08-30 20:45:40
Beman Dawes writes:
> * 5.2 Property Accessor's return-by-value from get(). That is fine where a
> small number of properties is involved. But for some applications there
> will be a considerably larger number. Of course, a pointer could be
> stored, but that gets messy. How about an additional get_ref() function
> (or maybe get_const_ref() in some concepts) which returns a
> reference? That makes using structs ever so much easier, without impacting
> the return by value needs of other apps. (I wasn't following the discussion
> last winter about property accessors; perhaps this has already been
> discussed.)
What you're looking for is the LvaluePropertyAccessor (5.2.4) which
defines an at() method that returns a reference.
Cheers,
Jeremy
P.S. And thanks for all the comments!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk