Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52443 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-04-17 11:40:36


Author: jewillco
Date: 2009-04-17 11:40:34 EDT (Fri, 17 Apr 2009)
New Revision: 52443
URL: http://svn.boost.org/trac/boost/changeset/52443

Log:
Trying to fix VC++ issue with overloading
Text files modified:
   trunk/boost/graph/betweenness_centrality.hpp | 15 ++++++++++++++-
   1 files changed, 14 insertions(+), 1 deletions(-)

Modified: trunk/boost/graph/betweenness_centrality.hpp
==============================================================================
--- trunk/boost/graph/betweenness_centrality.hpp (original)
+++ trunk/boost/graph/betweenness_centrality.hpp 2009-04-17 11:40:34 EDT (Fri, 17 Apr 2009)
@@ -512,6 +512,16 @@
     }
   };
 
+ template <typename T>
+ struct is_bgl_named_params {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+ template <typename Param, typename Tag, typename Rest>
+ struct is_bgl_named_params<bgl_named_params<Param, Tag, Rest> > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
 } } // end namespace detail::graph
 
 template<typename Graph, typename Param, typename Tag, typename Rest>
@@ -533,8 +543,11 @@
     get_param(params, edge_weight));
 }
 
+// disable_if is required to work around problem with MSVC 7.1 (it seems to not
+// get partial ordering getween this overload and the previous one correct)
 template<typename Graph, typename CentralityMap>
-void
+typename disable_if<detail::graph::is_bgl_named_params<CentralityMap>,
+ void>::type
 brandes_betweenness_centrality(const Graph& g, CentralityMap centrality
                                BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag))
 {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk