Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2005-03-17 22:48:46


On Mar 17, 2005, at 5:07 AM, manitou_at_[hidden] wrote:
> it looks like there is missing the default constructor in the class
>
> template<typename Graph, typename Descriptor, typename Bundle,
> typename T>
> struct bundle_property_map
> : put_get_helper<T&, bundle_property_map<Graph, Descriptor,
> Bundle, T> >
>
> I have just added
>
> bundle_property_map(){}
>
> into the class and it seems to work alright. However I don't know if
> this is
> a correct solution and the default constructor was just forgotten, or
> if
> this may lead to some unwanted behavior with bundled properties. It
> would be
> nice to get some feedback on this.

The default constructor was omitted intentionally, because a
default-constructed bundle_property_map doesn't have any sane
semantics. If you try to use it, you'll essentially be dereferencing a
NULL member pointer. I'm not opposed to adding a default constructor
for bundle_property_map, if you need it. But I'm curious why you're
using it?

        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