Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-08-31 07:24:14


Beman:
> 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.)

Jeremy:

> What you're looking for is the LvaluePropertyAccessor (5.2.4) which
> defines an at() method that returns a reference.

I saw that, but was put off by the requirement that it be read/write. What
about the case where what is needed is "const value_type& at(pa, k) const"?

--Beman


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