Boost C++ Libraries: Ticket #8: prop in undirected graph + out_edges https://svn.boost.org/trac10/ticket/8 <pre class="wiki">The following code ( only part of it ) where I tried to set the property of an edge obtained from an out edge_iterator: enum edge_state_t { not_visited, visited }; typedef boost::property&lt; boost::edge_name_t, edge_state_t &gt; edge_property; typedef boost::adjacency_list&lt; boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, edge_property, boost::no_property &gt; graph_type; graph_type g; boost::property_map&lt;graph_type,boost::edge_name_t&gt;::typ e edge_state = get(boost::edge_name_t(),g); out_edge_iterator e, eend; boost::tie(e, eend) = out_edges(tmpv,g); for ( ; e != eend; ++e ) if ( edge_state[*e] == not_visited ) { // Version 1 edge_state[*e] == visited; // Version 2 edge_state[edge(source(*e,g),targe(*e,g),g).first] = visited; tmpv = target(*e,g); } Version 2 works, while Version 1 does not ( the property is not assigned ). I'm not 100% sure that this should work, but as far as I know the documentation Version 1 should work as well. The out_edge_iterator is an ordered pair as the target vertex is fixed. The "normal" edge is undirected, so Version 1 seems only to work, when by luck, the ordered pair corresponds somhow to the unordered one. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8 Trac 1.4.3 nobody Mon, 22 Oct 2001 15:39:06 GMT <link>https://svn.boost.org/trac10/ticket/8#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8#comment:1</guid> <description> <pre class="wiki">Logged In: NO Dear Jeremy, I overlooked the == in Version 1. Please forget about the bug.... </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>jsiek</dc:creator> <pubDate>Mon, 22 Oct 2001 15:46:26 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/8#comment:2 https://svn.boost.org/trac10/ticket/8#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket