id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12272,vertex_iterator dereference has odd return value,ich.freak@…,Jeremiah Willcock,"graph_traits::vertex_iterator::operator* seems to not return Value& as it should. This not only differs from STL iterators but can and does easily cause segfaults. {{{ #!div style=""font-size: 80%"" Code highlighting: {{{#!cpp #include #include typedef boost::adjacency_list Graph; typedef boost::graph_traits::vertex_descriptor Vertex; typedef boost::graph_traits::vertex_iterator VIter; const Vertex& deref(const VIter& it){ return *it; // warning: returning reference to temporary [-Wreturn-local-addr] } const Vertex& deref(const std::list::iterator& it){ return *it; // no warning, works fine } int main(){ Graph g; Vertex u = boost::add_vertex(g); Vertex v = deref(boost::vertices(g).first); std::list vl(1, u); Vertex w = deref(vl.begin()); return 0; } }}} }}}",Bugs,new,To Be Determined,graph,Boost 1.61.0,Problem,,,