diff --git a/include/boost/graph/properties.hpp b/include/boost/graph/properties.hpp index 4c44ad84..320b659c 100644 --- a/include/boost/graph/properties.hpp +++ b/include/boost/graph/properties.hpp @@ -30,7 +30,10 @@ namespace boost { - enum default_color_type { white_color, gray_color, black_color }; + typedef short default_color_type; + default_color_type white_color = 0; + default_color_type gray_color = 1; + default_color_type black_color = -1; inline default_color_type white(default_color_type) { return white_color; } inline default_color_type gray(default_color_type) { return gray_color; } @@ -111,15 +114,15 @@ namespace boost { struct dummy_edge_property_selector { template struct bind { - typedef void type; - typedef void const_type; + typedef identity_property_map type; + typedef identity_property_map const_type; }; }; struct dummy_vertex_property_selector { template struct bind { - typedef void type; - typedef void const_type; + typedef identity_property_map type; + typedef identity_property_map const_type; }; }; @@ -167,9 +170,6 @@ namespace boost { // // It is overly complicated because it's a workaround for // partial specialization. - template - struct property_map_kind_selector { }; - struct choose_vertex_property_map { template struct bind { @@ -182,6 +182,12 @@ namespace boost { typedef edge_property_map type; }; }; + template + struct property_map_kind_selector { + // VC++ gets confused if this isn't defined, even though + // this never gets used. + typedef choose_vertex_property_map type; + }; template <> struct property_map_kind_selector { typedef choose_vertex_property_map type; }; @@ -194,7 +200,8 @@ namespace boost { class property_map { typedef typename Property::kind Kind; typedef typename detail::property_map_kind_selector::type Selector; - typedef typename Selector::bind::type Map; + typedef typename Selector::template bind Bind; + typedef typename Bind::type Map; public: typedef typename Map::type type; typedef typename Map::const_type const_type;