diff --git a/include/boost/graph/adjacency_list.hpp b/include/boost/graph/adjacency_list.hpp index 113143a7f..b5340f45b 100644 --- a/include/boost/graph/adjacency_list.hpp +++ b/include/boost/graph/adjacency_list.hpp @@ -28,9 +28,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -187,7 +187,7 @@ namespace detail { value = false }; - typedef mpl::false_ type; + typedef std::false_type type; }; template <> struct is_random_access< vecS > { @@ -195,12 +195,12 @@ namespace detail { value = true }; - typedef mpl::true_ type; + typedef std::true_type type; }; } // namespace detail -template < typename Selector > struct is_distributed_selector : mpl::false_ +template < typename Selector > struct is_distributed_selector : std::false_type { }; diff --git a/include/boost/graph/detail/labeled_graph_traits.hpp b/include/boost/graph/detail/labeled_graph_traits.hpp index b6600dbb0..1575ea046 100644 --- a/include/boost/graph/detail/labeled_graph_traits.hpp +++ b/include/boost/graph/detail/labeled_graph_traits.hpp @@ -9,6 +9,8 @@ #include +#include + namespace boost { @@ -84,7 +86,7 @@ struct labeled_add_only_property_graph_tag template < typename Graph > struct graph_has_add_vertex_by_label -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_add_vertex_tag >::value > { @@ -92,7 +94,7 @@ struct graph_has_add_vertex_by_label template < typename Graph > struct graph_has_add_vertex_by_label_with_property -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_add_vertex_property_tag >::value > { @@ -100,7 +102,7 @@ struct graph_has_add_vertex_by_label_with_property template < typename Graph > struct graph_has_remove_vertex_by_label -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_remove_vertex_tag >::value > { @@ -108,7 +110,7 @@ struct graph_has_remove_vertex_by_label template < typename Graph > struct graph_has_add_edge_by_label -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_add_edge_tag >::value > { @@ -116,7 +118,7 @@ struct graph_has_add_edge_by_label template < typename Graph > struct graph_has_add_edge_by_label_with_property -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_add_edge_property_tag >::value > { @@ -124,7 +126,7 @@ struct graph_has_add_edge_by_label_with_property template < typename Graph > struct graph_has_remove_edge_by_label -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_remove_edge_tag >::value > { @@ -132,49 +134,55 @@ struct graph_has_remove_edge_by_label template < typename Graph > struct is_labeled_mutable_vertex_graph -: mpl::and_< graph_has_add_vertex_by_label< Graph >, - graph_has_remove_vertex_by_label< Graph > > +: std::integral_constant< bool, + graph_has_add_vertex_by_label< Graph >::value + && graph_has_remove_vertex_by_label< Graph >::value > { }; template < typename Graph > struct is_labeled_mutable_vertex_property_graph -: mpl::and_< graph_has_add_vertex_by_label< Graph >, - graph_has_remove_vertex_by_label< Graph > > +: std::integral_constant< bool, + graph_has_add_vertex_by_label< Graph >::value + && graph_has_remove_vertex_by_label< Graph >::value > { }; template < typename Graph > struct is_labeled_mutable_edge_graph -: mpl::and_< graph_has_add_edge_by_label< Graph >, - graph_has_remove_edge_by_label< Graph > > +: std::integral_constant< bool, + graph_has_add_edge_by_label< Graph >::value + && graph_has_remove_edge_by_label< Graph >::value > { }; template < typename Graph > struct is_labeled_mutable_edge_property_graph -: mpl::and_< graph_has_add_edge_by_label< Graph >, - graph_has_remove_edge_by_label< Graph > > +: std::integral_constant< bool, + graph_has_add_edge_by_label< Graph >::value + && graph_has_remove_edge_by_label< Graph >::value > { }; template < typename Graph > struct is_labeled_mutable_graph -: mpl::and_< is_labeled_mutable_vertex_graph< Graph >, - is_labeled_mutable_edge_graph< Graph > > +: std::integral_constant< bool, + is_labeled_mutable_vertex_graph< Graph >::value + && is_labeled_mutable_edge_graph< Graph >::value > { }; template < typename Graph > struct is_labeled_mutable_property_graph -: mpl::and_< is_labeled_mutable_vertex_property_graph< Graph >, - is_labeled_mutable_edge_property_graph< Graph > > +: std::integral_constant< bool, + is_labeled_mutable_vertex_property_graph< Graph >::value + && is_labeled_mutable_edge_property_graph< Graph >::value > { }; template < typename Graph > struct is_labeled_add_only_property_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, labeled_add_only_property_graph_tag >::value > { @@ -182,7 +190,7 @@ struct is_labeled_add_only_property_graph template < typename Graph > struct is_labeled_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, label_vertex_tag >::value > { @@ -197,13 +205,15 @@ namespace graph_detail // graph_mutability_traits specialization below. template < typename Graph > struct determine_mutability { - typedef typename mpl::if_< is_add_only_property_graph< Graph >, + typedef typename std::conditional< + is_add_only_property_graph< Graph >::value, labeled_add_only_property_graph_tag, - typename mpl::if_< is_mutable_property_graph< Graph >, + typename std::conditional< is_mutable_property_graph< Graph >::value, labeled_mutable_property_graph_tag, - typename mpl::if_< is_mutable_graph< Graph >, + typename std::conditional< is_mutable_graph< Graph >::value, labeled_mutable_graph_tag, - typename mpl::if_< is_mutable_edge_graph< Graph >, + typename std::conditional< + is_mutable_edge_graph< Graph >::value, labeled_graph_tag, typename graph_mutability_traits< Graph >::category >:: type >::type >::type >::type type; diff --git a/include/boost/graph/graph_mutability_traits.hpp b/include/boost/graph/graph_mutability_traits.hpp index 064f32ff3..eb6526680 100644 --- a/include/boost/graph/graph_mutability_traits.hpp +++ b/include/boost/graph/graph_mutability_traits.hpp @@ -8,9 +8,7 @@ #define BOOST_GRAPH_MUTABILITY_TRAITS_HPP #include -#include -#include -#include +#include #include #include @@ -90,7 +88,7 @@ template < typename Graph > struct graph_mutability_traits template < typename Graph > struct graph_has_add_vertex -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, add_vertex_tag >::value > { @@ -98,7 +96,7 @@ struct graph_has_add_vertex template < typename Graph > struct graph_has_add_vertex_with_property -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, add_vertex_property_tag >::value > { @@ -106,7 +104,7 @@ struct graph_has_add_vertex_with_property template < typename Graph > struct graph_has_remove_vertex -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, remove_vertex_tag >::value > { @@ -114,7 +112,7 @@ struct graph_has_remove_vertex template < typename Graph > struct graph_has_add_edge -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, add_edge_tag >::value > { @@ -122,7 +120,7 @@ struct graph_has_add_edge template < typename Graph > struct graph_has_add_edge_with_property -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, add_edge_property_tag >::value > { @@ -130,7 +128,7 @@ struct graph_has_add_edge_with_property template < typename Graph > struct graph_has_remove_edge -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, remove_edge_tag >::value > { @@ -138,46 +136,55 @@ struct graph_has_remove_edge template < typename Graph > struct is_mutable_vertex_graph -: mpl::and_< graph_has_add_vertex< Graph >, graph_has_remove_vertex< Graph > > +: std::integral_constant< bool, + graph_has_add_vertex< Graph >::value + && graph_has_remove_vertex< Graph >::value > { }; template < typename Graph > struct is_mutable_vertex_property_graph -: mpl::and_< graph_has_add_vertex_with_property< Graph >, - graph_has_remove_vertex< Graph > > +: std::integral_constant< bool, + graph_has_add_vertex_with_property< Graph >::value + && graph_has_remove_vertex< Graph >::value > { }; template < typename Graph > struct is_mutable_edge_graph -: mpl::and_< graph_has_add_edge< Graph >, graph_has_remove_edge< Graph > > +: std::integral_constant< bool, + graph_has_add_edge< Graph >::value + && graph_has_remove_edge< Graph >::value > { }; template < typename Graph > struct is_mutable_edge_property_graph -: mpl::and_< graph_has_add_edge_with_property< Graph >, - graph_has_remove_edge< Graph > > +: std::integral_constant< bool, + graph_has_add_edge_with_property< Graph >::value + && graph_has_remove_edge< Graph >::value > { }; template < typename Graph > struct is_mutable_graph -: mpl::and_< is_mutable_vertex_graph< Graph >, is_mutable_edge_graph< Graph > > +: std::integral_constant< bool, + is_mutable_vertex_graph< Graph >::value + && is_mutable_edge_graph< Graph >::value > { }; template < typename Graph > struct is_mutable_property_graph -: mpl::and_< is_mutable_vertex_property_graph< Graph >, - is_mutable_edge_property_graph< Graph > > +: std::integral_constant< bool, + is_mutable_vertex_property_graph< Graph >::value + && is_mutable_edge_property_graph< Graph >::value > { }; template < typename Graph > struct is_add_only_property_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_mutability_traits< Graph >::category, add_only_property_graph_tag >::value > { diff --git a/include/boost/graph/graph_selectors.hpp b/include/boost/graph/graph_selectors.hpp index e37210d09..b7ba91272 100644 --- a/include/boost/graph/graph_selectors.hpp +++ b/include/boost/graph/graph_selectors.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_GRAPH_SELECTORS_HPP #define BOOST_GRAPH_SELECTORS_HPP -#include +#include namespace boost { @@ -26,8 +26,8 @@ struct directedS is_directed = true, is_bidir = false }; - typedef mpl::true_ is_directed_t; - typedef mpl::false_ is_bidir_t; + using is_directed_t = std::true_type; + using is_bidir_t = std::false_type; }; struct undirectedS { @@ -36,8 +36,8 @@ struct undirectedS is_directed = false, is_bidir = false }; - typedef mpl::false_ is_directed_t; - typedef mpl::false_ is_bidir_t; + using is_directed_t = std::false_type; + using is_bidir_t = std::false_type; }; struct bidirectionalS { @@ -46,8 +46,8 @@ struct bidirectionalS is_directed = true, is_bidir = true }; - typedef mpl::true_ is_directed_t; - typedef mpl::true_ is_bidir_t; + using is_directed_t = std::true_type; + using is_bidir_t = std::true_type; }; } // namespace boost diff --git a/include/boost/graph/graph_traits.hpp b/include/boost/graph/graph_traits.hpp index 6076160f6..06dd01a70 100644 --- a/include/boost/graph/graph_traits.hpp +++ b/include/boost/graph/graph_traits.hpp @@ -14,9 +14,6 @@ #include #include /* Primarily for std::pair */ #include -#include -#include -#include #include #include #include @@ -121,7 +118,7 @@ namespace graph_detail { template < typename Tag > struct is_directed_tag - : mpl::bool_< is_convertible< Tag, directed_tag >::value > + : std::integral_constant< bool, is_convertible< Tag, directed_tag >::value > { }; } // namespace graph_detail @@ -134,7 +131,8 @@ struct is_directed_graph }; template < typename Graph > -struct is_undirected_graph : mpl::not_< is_directed_graph< Graph > > +struct is_undirected_graph +: std::integral_constant< bool, !is_directed_graph< Graph >::value > { }; //@} @@ -169,8 +167,9 @@ template < typename Graph > bool allows_parallel_edges(const Graph&) */ template < typename Graph > struct is_multigraph -: mpl::bool_< is_same< typename graph_traits< Graph >::edge_parallel_category, - allow_parallel_edge_tag >::value > +: std::integral_constant< bool, + is_same< typename graph_traits< Graph >::edge_parallel_category, + allow_parallel_edge_tag >::value > { }; //@} @@ -217,7 +216,7 @@ struct distributed_edge_list_graph_tag //@{ template < typename Graph > struct is_incidence_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_traits< Graph >::traversal_category, incidence_graph_tag >::value > { @@ -225,7 +224,7 @@ struct is_incidence_graph template < typename Graph > struct is_bidirectional_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_traits< Graph >::traversal_category, bidirectional_graph_tag >::value > { @@ -233,7 +232,7 @@ struct is_bidirectional_graph template < typename Graph > struct is_vertex_list_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_traits< Graph >::traversal_category, vertex_list_graph_tag >::value > { @@ -241,7 +240,7 @@ struct is_vertex_list_graph template < typename Graph > struct is_edge_list_graph -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_traits< Graph >::traversal_category, edge_list_graph_tag >::value > { @@ -249,7 +248,7 @@ struct is_edge_list_graph template < typename Graph > struct is_adjacency_matrix -: mpl::bool_< +: std::integral_constant< bool, is_convertible< typename graph_traits< Graph >::traversal_category, adjacency_matrix_tag >::value > { @@ -264,14 +263,17 @@ struct is_adjacency_matrix //@{ template < typename Graph > struct is_directed_unidirectional_graph -: mpl::and_< is_directed_graph< Graph >, - mpl::not_< is_bidirectional_graph< Graph > > > +: std::integral_constant< bool, + is_directed_graph< Graph >::value + && !is_bidirectional_graph< Graph >::value > { }; template < typename Graph > struct is_directed_bidirectional_graph -: mpl::and_< is_directed_graph< Graph >, is_bidirectional_graph< Graph > > +: std::integral_constant< bool, + is_directed_graph< Graph >::value + && is_bidirectional_graph< Graph >::value > { }; //@} @@ -374,7 +376,8 @@ namespace graph_detail // A helper metafunction for determining whether or not a type is // bundled. template < typename T > - struct is_no_bundle : mpl::bool_< is_same< T, no_property >::value > + struct is_no_bundle + : std::integral_constant< bool, is_same< T, no_property >::value > { }; } // namespace graph_detail @@ -387,43 +390,49 @@ namespace graph_detail //@{ template < typename Graph > struct has_graph_property -: mpl::not_< typename detail::is_no_property< - typename graph_property_type< Graph >::type >::type >::type +: std::integral_constant< bool, + !detail::is_no_property< + typename graph_property_type< Graph >::type >::value > { }; template < typename Graph > struct has_bundled_graph_property -: mpl::not_< - graph_detail::is_no_bundle< typename graph_bundle_type< Graph >::type > > +: std::integral_constant< bool, + !graph_detail::is_no_bundle< + typename graph_bundle_type< Graph >::type >::value > { }; template < typename Graph > struct has_vertex_property -: mpl::not_< typename detail::is_no_property< - typename vertex_property_type< Graph >::type > >::type +: std::integral_constant< bool, + !detail::is_no_property< + typename vertex_property_type< Graph >::type >::value > { }; template < typename Graph > struct has_bundled_vertex_property -: mpl::not_< - graph_detail::is_no_bundle< typename vertex_bundle_type< Graph >::type > > +: std::integral_constant< bool, + !graph_detail::is_no_bundle< + typename vertex_bundle_type< Graph >::type >::value > { }; template < typename Graph > struct has_edge_property -: mpl::not_< typename detail::is_no_property< - typename edge_property_type< Graph >::type > >::type +: std::integral_constant< bool, + !detail::is_no_property< + typename edge_property_type< Graph >::type >::value > { }; template < typename Graph > struct has_bundled_edge_property -: mpl::not_< - graph_detail::is_no_bundle< typename edge_bundle_type< Graph >::type > > +: std::integral_constant< bool, + !graph_detail::is_no_bundle< + typename edge_bundle_type< Graph >::type >::value > { }; //@} diff --git a/include/boost/graph/reverse_graph.hpp b/include/boost/graph/reverse_graph.hpp index 86bcdc408..b1f7f4ac4 100644 --- a/include/boost/graph/reverse_graph.hpp +++ b/include/boost/graph/reverse_graph.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace boost { @@ -477,15 +477,15 @@ struct property_map< reverse_graph< BidirGraph, GRef >, Property > is_edge_prop; typedef boost::is_const< typename boost::remove_reference< GRef >::type > is_ref_const; - typedef typename boost::mpl::if_< is_ref_const, + typedef typename std::conditional< is_ref_const::value, typename property_map< BidirGraph, Property >::const_type, typename property_map< BidirGraph, Property >::type >::type orig_type; typedef typename property_map< BidirGraph, Property >::const_type orig_const_type; - typedef typename boost::mpl::if_< is_edge_prop, + typedef typename std::conditional< is_edge_prop::value, detail::reverse_graph_edge_property_map< orig_type >, orig_type >::type type; - typedef typename boost::mpl::if_< is_edge_prop, + typedef typename std::conditional< is_edge_prop::value, detail::reverse_graph_edge_property_map< orig_const_type >, orig_const_type >::type const_type; }; @@ -499,7 +499,7 @@ struct property_map< const reverse_graph< BidirGraph, GRef >, Property > is_edge_prop; typedef typename property_map< BidirGraph, Property >::const_type orig_const_type; - typedef typename boost::mpl::if_< is_edge_prop, + typedef typename std::conditional< is_edge_prop::value, detail::reverse_graph_edge_property_map< orig_const_type >, orig_const_type >::type const_type; typedef const_type type; @@ -585,11 +585,11 @@ struct property_map< reverse_graph< Graph, GRef >, edge_underlying_t > typedef detail::underlying_edge_desc_map_type< ed > const_type; }; -template < typename T > struct is_reverse_graph : boost::mpl::false_ +template < typename T > struct is_reverse_graph : std::false_type { }; template < typename G, typename R > -struct is_reverse_graph< reverse_graph< G, R > > : boost::mpl::true_ +struct is_reverse_graph< reverse_graph< G, R > > : std::true_type { }; @@ -641,8 +641,8 @@ inline void set_property(const reverse_graph< BidirectionalGraph, GRef >& g, } template < typename BidirectionalGraph, typename GRef, typename Tag > -inline typename boost::mpl::if_< - boost::is_const< typename boost::remove_reference< GRef >::type >, +inline typename std::conditional< + boost::is_const< typename boost::remove_reference< GRef >::type >::value, const typename graph_property< BidirectionalGraph, Tag >::type&, typename graph_property< BidirectionalGraph, Tag >::type& >::type get_property(const reverse_graph< BidirectionalGraph, GRef >& g, Tag tag) diff --git a/include/boost/pending/property.hpp b/include/boost/pending/property.hpp index 6b4ee07f6..85cc5440a 100644 --- a/include/boost/pending/property.hpp +++ b/include/boost/pending/property.hpp @@ -7,9 +7,8 @@ #define BOOST_PROPERTY_HPP #include -#include -#include #include +#include #include #include #include @@ -256,10 +255,10 @@ template < typename T, typename Tag > struct lookup_one_property< const T, Tag > // instead with a nested kind type and num. Also, we may want to // switch BGL back to using class types for properties at some point. -template < class P > struct has_property : boost::mpl::true_ +template < class P > struct has_property : std::true_type { }; -template <> struct has_property< no_property > : boost::mpl::false_ +template <> struct has_property< no_property > : std::false_type { }; @@ -294,7 +293,8 @@ namespace detail /** This trait returns true if T is no_property. */ template < typename T > - struct is_no_property : mpl::bool_< is_same< T, no_property >::value > + struct is_no_property + : std::integral_constant< bool, is_same< T, no_property >::value > { }; @@ -358,7 +358,7 @@ namespace detail typedef typename boost::function_traits< F >::arg1_type a1; typedef typename boost::remove_reference< a1 >::type non_ref; typedef typename non_ref::next_type nx; - typedef typename boost::mpl::if_< boost::is_const< non_ref >, + typedef typename std::conditional< boost::is_const< non_ref >::value, boost::add_const< nx >, nx >::type with_const; typedef typename boost::add_reference< with_const >::type type; }; diff --git a/test/test_construction.hpp b/test/test_construction.hpp index 787fcf37c..b2fb590b8 100644 --- a/test/test_construction.hpp +++ b/test/test_construction.hpp @@ -7,6 +7,7 @@ #ifndef TEST_CONSTRUCTION_HPP #define TEST_CONSTRUCTION_HPP +#include #include #include @@ -25,7 +26,7 @@ void build_graph(Graph& g, Add, Label) // This matches MutableGraph, so just add some vertices. template < typename Graph > -void build_graph(Graph& g, boost::mpl::true_, boost::mpl::false_) +void build_graph(Graph& g, std::true_type, std::false_type) { using namespace boost; BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >)); @@ -41,7 +42,7 @@ void build_graph(Graph& g, boost::mpl::true_, boost::mpl::false_) // This will match labeled graphs. template < typename Graph > -void build_graph(Graph& g, boost::mpl::false_, boost::mpl::true_) +void build_graph(Graph& g, std::false_type, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >)); @@ -69,7 +70,7 @@ void build_property_graph(Graph const& g, Add, Label) } template < typename Graph > -void build_property_graph(Graph const&, boost::mpl::true_, boost::mpl::false_) +void build_property_graph(Graph const&, std::true_type, std::false_type) { using namespace boost; BOOST_CONCEPT_ASSERT((VertexMutablePropertyGraphConcept< Graph >)); @@ -93,7 +94,7 @@ void build_property_graph(Graph const&, boost::mpl::true_, boost::mpl::false_) */ //@{ template < typename Graph, typename VertexSet > -void connect_graph(Graph& g, VertexSet const& verts, boost::mpl::false_) +void connect_graph(Graph& g, VertexSet const& verts, std::false_type) { using namespace boost; BOOST_CONCEPT_ASSERT((AdjacencyMatrixConcept< Graph >)); @@ -113,7 +114,7 @@ void connect_graph(Graph& g, VertexSet const& verts, boost::mpl::false_) } template < typename Graph, typename VertexSet > -void connect_graph(Graph& g, VertexSet const& verts, boost::mpl::true_) +void connect_graph(Graph& g, VertexSet const& verts, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((AdjacencyMatrixConcept< Graph >)); diff --git a/test/test_destruction.hpp b/test/test_destruction.hpp index f70828a52..62490958b 100644 --- a/test/test_destruction.hpp +++ b/test/test_destruction.hpp @@ -7,6 +7,7 @@ #ifndef TEST_DESTRUCTION_HPP #define TEST_DESTRUCTION_HPP +#include #include #include @@ -23,7 +24,7 @@ void destroy_graph(Graph&, VertexSet const&, Remove, Label) // This matches MutableGraph, so just remove a vertex and then clear. template < typename Graph, typename VertexSet > void destroy_graph( - Graph& g, VertexSet const& verts, boost::mpl::true_, boost::mpl::false_) + Graph& g, VertexSet const& verts, std::true_type, std::false_type) { using namespace boost; BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >)); @@ -38,7 +39,7 @@ void destroy_graph( // This will match labeled graphs. template < typename Graph, typename VertexSet > void destroy_graph( - Graph& g, VertexSet const&, boost::mpl::false_, boost::mpl::true_) + Graph& g, VertexSet const&, std::false_type, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >)); @@ -62,7 +63,7 @@ void destroy_graph( //@{ template < typename Graph, typename VertexSet > -void disconnect_graph(Graph& g, VertexSet const& verts, boost::mpl::false_) +void disconnect_graph(Graph& g, VertexSet const& verts, std::false_type) { using namespace boost; BOOST_CONCEPT_ASSERT((EdgeListGraphConcept< Graph >)); @@ -90,7 +91,7 @@ void disconnect_graph(Graph& g, VertexSet const& verts, boost::mpl::false_) } template < typename Graph, typename VertexSet > -void disconnect_graph(Graph& g, VertexSet const&, boost::mpl::true_) +void disconnect_graph(Graph& g, VertexSet const&, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((EdgeListGraphConcept< Graph >)); diff --git a/test/test_direction.hpp b/test/test_direction.hpp index 7cc0bad6d..17e27d13d 100644 --- a/test/test_direction.hpp +++ b/test/test_direction.hpp @@ -7,6 +7,7 @@ #ifndef TEST_DIRECTION_HPP #define TEST_DIRECTION_HPP +#include #include #include #include @@ -17,7 +18,7 @@ //@{ template < typename Graph, typename VertexSet > void test_outdirected_graph( - Graph const& g, VertexSet const& verts, boost::mpl::true_) + Graph const& g, VertexSet const& verts, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((IncidenceGraphConcept< Graph >)); @@ -53,7 +54,7 @@ void test_outdirected_graph( } template < typename Graph, typename VertexSet > -void test_outdirected_graph(Graph const&, VertexSet const&, boost::mpl::false_) +void test_outdirected_graph(Graph const&, VertexSet const&, std::false_type) { } //@} @@ -64,7 +65,7 @@ void test_outdirected_graph(Graph const&, VertexSet const&, boost::mpl::false_) //@{ template < typename Graph, typename VertexSet > void test_indirected_graph( - Graph const& g, VertexSet const& verts, boost::mpl::true_) + Graph const& g, VertexSet const& verts, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< Graph >)); @@ -96,7 +97,7 @@ void test_indirected_graph( } template < typename Graph, typename VertexSet > -void test_indirected_graph(Graph const&, VertexSet const&, boost::mpl::false_) +void test_indirected_graph(Graph const&, VertexSet const&, std::false_type) { } //@} @@ -106,7 +107,7 @@ void test_indirected_graph(Graph const&, VertexSet const&, boost::mpl::false_) */ template < typename Graph, typename VertexSet > void test_undirected_graph( - Graph const& g, VertexSet const& verts, boost::mpl::true_) + Graph const& g, VertexSet const& verts, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((IncidenceGraphConcept< Graph >)); @@ -134,7 +135,7 @@ void test_undirected_graph( } template < typename Graph, typename VertexSet > -void test_undirected_graph(Graph const&, VertexSet const&, boost::mpl::false_) +void test_undirected_graph(Graph const&, VertexSet const&, std::false_type) { } //@} diff --git a/test/test_properties.hpp b/test/test_properties.hpp index 677fa4850..03186174b 100644 --- a/test/test_properties.hpp +++ b/test/test_properties.hpp @@ -7,12 +7,13 @@ #ifndef TEST_PROPERTIES_HPP #define TEST_PROPERTIES_HPP +#include #include template < typename T > T const& as_const(T& x) { return x; } template < typename T > void ignore(T const&) {} -template < typename Graph > void test_graph_bundle(Graph& g, boost::mpl::true_) +template < typename Graph > void test_graph_bundle(Graph& g, std::true_type) { using namespace boost; std::cout << "...test_graph_bundle\n"; @@ -28,7 +29,7 @@ template < typename Graph > void test_graph_bundle(Graph& g, boost::mpl::true_) ignore(cb2); } -template < typename Graph > void test_graph_bundle(Graph& g, boost::mpl::false_) +template < typename Graph > void test_graph_bundle(Graph& g, std::false_type) { } @@ -38,7 +39,7 @@ template < typename Graph > void test_graph_bundle(Graph& g, boost::mpl::false_) */ //@{ template < typename Graph, typename VertexSet > -void test_vertex_bundle(Graph& g, VertexSet const& verts, boost::mpl::true_) +void test_vertex_bundle(Graph& g, VertexSet const& verts, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((GraphConcept< Graph >)); @@ -68,7 +69,7 @@ void test_vertex_bundle(Graph& g, VertexSet const& verts, boost::mpl::true_) } template < typename Graph, typename VertexSet > -void test_vertex_bundle(Graph&, VertexSet const&, boost::mpl::false_) +void test_vertex_bundle(Graph&, VertexSet const&, std::false_type) { } //@} @@ -79,7 +80,7 @@ void test_vertex_bundle(Graph&, VertexSet const&, boost::mpl::false_) */ //@{ template < typename Graph, typename VertexSet > -void test_edge_bundle(Graph& g, VertexSet const& verts, boost::mpl::true_) +void test_edge_bundle(Graph& g, VertexSet const& verts, std::true_type) { using namespace boost; BOOST_CONCEPT_ASSERT((GraphConcept< Graph >)); @@ -110,7 +111,7 @@ void test_edge_bundle(Graph& g, VertexSet const& verts, boost::mpl::true_) } template < typename Graph, typename VertexSet > -void test_edge_bundle(Graph&, VertexSet const&, boost::mpl::false_) +void test_edge_bundle(Graph&, VertexSet const&, std::false_type) { } //@}