Boost logo

Boost Users :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2005-06-22 11:48:40


On Jun 14, 2005, at 1:35 PM, martin f krafft wrote:

> also sprach Doug Gregor <dgregor_at_[hidden]> [2005.06.14.2006
> +0200]:
>> property map). If you have a const graph or property map, you get
>> const property values; non-const graphs and property maps give
>> non-const property values. If we put the properties in the
>> descriptors, we need to have const and non-const descriptors,
>
> Your explanation makes perfect sense. One thing I am left to wonder
> though is why edge descriptors aren't const by definition. After
> all, I should not be allowed to modify them at all. Moreover,
> I should not be allowed to modify them if part of a const graph.

edge descriptors are meant to be "opaque"; the documentation doesn't
say anything about their structure, so there are no guarantees about
what they contain. In truth, everything in an edge description that
doesn't involve copying or constructing should be private, but that
couldn't be done when the BGL was written because most compilers
couldn't handle templated friends.

        Doug


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net