Boost C++ Libraries: Ticket #12939: use of boost::graph_bundle with subgraph https://svn.boost.org/trac10/ticket/12939 <p> using boost::graph_bundle with a subgraph picks up the 'vertex' access delegate. This is because boost::graph_bundle enumeration gets downgraded to an integer, which matches the first template specialization in subgraph.hpp </p> <p> <strong>example</strong>: </p> <pre class="wiki">struct VertexProperties { std::string name; }; struct EdgeProperties { std::string name; }; struct GraphProperties { std::string name; }; boost::subgraph&lt; boost::adjacency_list&lt; boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_index_t,size_t,VertexProperties&gt;, boost::property&lt;boost::edge_index_t,size_t,EdgeProperties&gt;, GraphProperties&gt; &gt; graph; auto name = graph[boost::graph_bundle].name; </pre><p> <strong>compiler error:</strong> </p> <pre class="wiki">boost/graph/subgraph.hpp:278:24: error: no match for ternary 'operator?:' (operand types are 'bool', 'boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_index_t, long unsigned int, tpg::VertexProperties&gt;, boost::property&lt;boost::edge_index_t, long unsigned int, tpg::EdgeProperties&gt;, tpg::GraphProperties&gt;::graph_bundled {aka tpg::GraphProperties}', and 'boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_index_t, long unsigned int, tpg::VertexProperties&gt;, boost::property&lt;boost::edge_index_t, long unsigned int, tpg::EdgeProperties&gt;, tpg::GraphProperties&gt;::vertex_bundled {aka tpg::VertexProperties}') { return is_root() ? m_graph[x] : root().m_graph[local_to_global(x)]; } ^ boost/graph/subgraph.hpp: In member function 'typename boost::graph::detail::bundled_result&lt;Graph, Descriptor&gt;::type&amp; boost::subgraph&lt;Graph&gt;::operator[](Descriptor) [with Descriptor = boost::graph_bundle_t; Graph = boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, boost::property&lt;boost::vertex_index_t, long unsigned int, tpg::VertexProperties&gt;, boost::property&lt;boost::edge_index_t, long unsigned int, tpg::EdgeProperties&gt;, tpg::GraphProperties&gt;; typename boost::graph::detail::bundled_result&lt;Graph, Descriptor&gt;::type = tpg::GraphProperties]': boost/graph/subgraph.hpp:278:75: warning: control reaches end of non-void function [-Wreturn-type] { return is_root() ? m_graph[x] : root().m_graph[local_to_global(x)]; } </pre><p> <strong>workaround/hack</strong>: explicitly use local_property or global_property lookup classes. </p> <pre class="wiki">auto name = graph[boost::global_property&lt;boost::graph_bundle_t&gt;(boost::graph_bundle)].name; </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12939 Trac 1.4.3