
I'd like to know a little more about the design rationale for property maps,
specifically the (maybe implicit) decision not to overload operator[] with
respect to constness. The design leads to a situation that is, in some
respects, at odds with convention.
The most obvious point of conflict is put_get_helper. In fact, I wouldn't be
surprised if the decision not to overload operator[] was simply a consequence
of writing put_get_helper. (Pure speculation.)
template

On Mar 5, 2006, at 3:19 PM, Daniel Mitchell wrote:
My initial statement was that the design leads to a situation that is *in some respects* at odds with convention. When property maps are viewed, not as first class containers of their data, but as having more-or-less the same status as container iterators, the situation clarifies. I suppose that must have been the author's intent.
I believe that was the intent. Property maps have shallow copying semantics (like pointers and iterators), which often (but not always <g>) implies that the constness of the data is not based on constness of the type referencing the data. Doug
participants (2)
-
Daniel Mitchell
-
Douglas Gregor