[BGL] property default constructor

12 Apr
2004
12 Apr
'04
1:32 p.m.
The default constructor of boost::property is defined as: template <class Tag, class T, class Base = no_property> struct property : public Base { .... property() { } So, for the case where T = builtin type or a pointer, it's simply not initialized, per rules in 12.6.2/4. Is this desired behaviour? I was bitted by this twice, because I have: typedef boost::property< semantics_tag, Semantic*, boost::property< boost::edge_weight_t, unsigned > > EdgeProperties; and neither of properties is initialized when I do: add_edge(v1, v2, g); Maybe, the ctor should be: property() : m_value() {} ? - Volodya
7732
Age (days ago)
7732
Last active (days ago)
0 comments
1 participants
participants (1)
-
Vladimir Prus