diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp index a3ea40aa..cab4cecb 100644 --- a/include/boost/graph/detail/adjacency_list.hpp +++ b/include/boost/graph/detail/adjacency_list.hpp @@ -2574,14 +2574,13 @@ namespace boost { }; namespace detail { template - struct adj_list_choose_vertex_pa { - typedef typename - boost::mpl::if_, adj_list_all_vertex_pa, adj_list_any_vertex_pa>::type - Helper; - typedef typename Helper::template bind_ Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; + struct adj_list_choose_vertex_pa + : boost::mpl::if_< + boost::is_same, + adj_list_all_vertex_pa, + adj_list_any_vertex_pa>::type + ::template bind_ + {}; template @@ -2597,12 +2596,9 @@ namespace boost { typedef vec_adj_list_all_vertex_pa type; }; template - struct vec_adj_list_choose_vertex_pa { - typedef typename vec_adj_list_choose_vertex_pa_helper::type Helper; - typedef typename Helper::template bind_ Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; + struct vec_adj_list_choose_vertex_pa + : vec_adj_list_choose_vertex_pa_helper::type::template bind_ + {}; } // namespace detail //========================================================================= @@ -2693,19 +2689,12 @@ namespace boost { typedef adj_list_all_edge_pmap type; }; template - struct adj_list_choose_edge_pmap { - typedef typename adj_list_choose_edge_pmap_helper::type Helper; - typedef typename Helper::template bind_ Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; + struct adj_list_choose_edge_pmap + : adj_list_choose_edge_pmap_helper::type::template bind_ + {}; struct adj_list_edge_property_selector { template - struct bind_ { - typedef adj_list_choose_edge_pmap Choice; - typedef typename Choice::type type; - typedef typename Choice::const_type const_type; - }; + struct bind_: adj_list_choose_edge_pmap {}; }; } // namespace detail @@ -2722,11 +2711,9 @@ namespace boost { struct adj_list_vertex_property_selector { template - struct bind_ { - typedef detail::adj_list_choose_vertex_pa Choice; - typedef typename Choice::type type; - typedef typename Choice::const_type const_type; - }; + struct bind_ + : detail::adj_list_choose_vertex_pa + {}; }; template <> struct vertex_property_selector { @@ -2735,11 +2722,7 @@ namespace boost { struct vec_adj_list_vertex_property_selector { template - struct bind_ { - typedef detail::vec_adj_list_choose_vertex_pa Choice; - typedef typename Choice::type type; - typedef typename Choice::const_type const_type; - }; + struct bind_: detail::vec_adj_list_choose_vertex_pa {}; }; template <> struct vertex_property_selector { diff --git a/include/boost/graph/properties.hpp b/include/boost/graph/properties.hpp index 6656d962..6b5ade97 100644 --- a/include/boost/graph/properties.hpp +++ b/include/boost/graph/properties.hpp @@ -205,27 +205,23 @@ namespace boost { }; template - struct edge_property_map { - typedef typename edge_property_type::type Property; - typedef typename graph_tag_or_void::type graph_tag; - typedef typename edge_property_selector::type Selector; - typedef typename Selector::template bind_ - Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; + struct edge_property_map + : edge_property_selector< + typename graph_tag_or_void::type + >::type::template bind_< + Graph, + typename edge_property_type::type, + PropertyTag> + {}; template - class vertex_property_map { - public: - typedef typename vertex_property_type::type Property; - typedef typename graph_tag_or_void::type graph_tag; - typedef typename vertex_property_selector::type Selector; - typedef typename Selector::template bind_ - Bind; - public: - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; + struct vertex_property_map + : vertex_property_selector< + typename graph_tag_or_void::type + >::type::template bind_< + Graph, + typename vertex_property_type::type, + PropertyTag> + {}; } // namespace detail template diff --git a/include/boost/graph/undirected_graph.hpp b/include/boost/graph/undirected_graph.hpp index 884f5dbe..b22fb959 100644 --- a/include/boost/graph/undirected_graph.hpp +++ b/include/boost/graph/undirected_graph.hpp @@ -529,11 +529,7 @@ remove_in_edge_if(typename UNDIRECTED_GRAPH::vertex_descriptor v, { return remove_in_edge_if(v, pred, g.impl()); } template -struct property_map { - typedef typename UNDIRECTED_GRAPH::graph_type Graph; - typedef typename property_map::type type; - typedef typename property_map::const_type const_type; -}; +struct property_map: property_map {}; // PropertyGraph concepts template