diff --git a/include/boost/graph/graph_archetypes.hpp b/include/boost/graph/graph_archetypes.hpp index c9424d7f..48b45160 100644 --- a/include/boost/graph/graph_archetypes.hpp +++ b/include/boost/graph/graph_archetypes.hpp @@ -201,13 +201,15 @@ namespace boost { // should use a different namespace for this template typename property_map, P>::type get(P, property_graph_archetype&) { - return typename property_map, P>::type(); + typename property_map, P>::type pmap; + return pmap; } template typename property_map, P>::const_type get(P, const property_graph_archetype&) { - return typename property_map, P>::const_type(); + typename property_map, P>::const_type pmap; + return pmap; } template @@ -247,14 +249,10 @@ namespace boost { // should use a different namespace for this public: void push(const T&) {} void pop() {} - T& top() { return s_top; } - const T& top() const { return s_top; } + T& top() { return static_object::get(); } + const T& top() const { return static_object::get(); } bool empty() const { return true; } - private: - static T s_top; }; - template - T buffer_archetype::s_top(dummy_cons); } // namespace boost