id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 914,problem with lvalue property maps,nobody,jsiek,"{{{ [Boost 1.21.1 with egcs 2.95.2] The code at the end of this report gives me the compiler error /usr/local/include/boost/graph/detail/adjacency_list.hpp: In method `double & boost::vec_adj_list_vertex_property_map,boost::no_property,boost::no_property>,const boost::adjacency_list,boost::no_property,boost::no_property> &,boost::property,vertex_info_t>::operator [](unsigned int)': foo.cc:19: instantiated from here /usr/local/include/boost/graph/detail/adjacency_list.hpp:2084: conversion from `const double' to `double &' discards qualifiers Apparently operator[] leaves out the const in its return type for the const_type version of a property map. ------------- code begins -------------- #include #include using namespace boost; struct vertex_info_t { }; namespace boost { BOOST_INSTALL_PROPERTY(vertex, info); }; typedef property vertex_properties; typedef adjacency_list graph_t; double const & foo(graph_t const & x) { property_map::const_type pmap = get(vertex_info_t(), x); return pmap[vertex(0, x)]; } }}}",Bugs,closed,,graph,None,,None,,