From d5110c4e71f087e8c1dc51a5d61a5db8d74e1875 Mon Sep 17 00:00:00 2001 From: varunsha30 Date: Tue, 6 Oct 2026 20:14:59 +0530 Subject: [PATCH] Use constexpr values in both `is_bgl_named_params` specializations. This makes the trait's role in separating named-parameter calls from centrality-map overloads explicit. --- include/boost/graph/betweenness_centrality.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/boost/graph/betweenness_centrality.hpp b/include/boost/graph/betweenness_centrality.hpp index b8fd65e2b..80cf12eef 100644 --- a/include/boost/graph/betweenness_centrality.hpp +++ b/include/boost/graph/betweenness_centrality.hpp @@ -116,7 +116,8 @@ namespace detail * using the Dijkstra visitor for the Brandes betweenness centrality * algorithm. */ - template < typename WeightMap > struct brandes_dijkstra_shortest_paths + template < typename WeightMap > + struct brandes_dijkstra_shortest_paths { brandes_dijkstra_shortest_paths(WeightMap weight_map) : weight_map(weight_map) @@ -362,7 +363,7 @@ namespace detail dependency_type; for (incoming_iterator vw = incoming[w].begin(); - vw != incoming[w].end(); ++vw) + vw != incoming[w].end(); ++vw) { vertex_descriptor v = source(*vw, g); dependency_type factor @@ -533,15 +534,16 @@ namespace detail } }; - template < typename T > struct is_bgl_named_params + template < typename T > + struct is_bgl_named_params { - BOOST_STATIC_CONSTANT(bool, value = false); + static constexpr 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); + static constexpr bool value = true; }; }