Hi all,
I am new to BGL and the followings are snippets from my code. When I
compile my code I get the following error.
Any suggestions,
error: no match for ‘operator=’ in
‘city_name.boost::vec_adj_list_vertex_property_map::operator[] [with Graph =
boost::adjacency_list, boost::no_property>,
boost::no_property, boost::listS>, GraphPtr =
boost::adjacency_list, boost::no_property>,
boost::no_property, boost::listS>*, ValueType =
boost::detail::error_property_not_found, Reference =
boost::detail::error_property_not_found&, Tag = boost::vertex_name_t](v1) =
r’
/home1/mutlu/boost/include/boost-1_37/boost/pending/detail/property.hpp:21:
note: candidates are: boost::detail::error_property_not_found&
boost::detail::error_property_not_found::operator=(const
boost::detail::error_property_not_found&)
struct argument{
int is_variable;
string value;
};
struct relation{
string relation_name;
vector<argument> arguments;
};
typedef property EdgeNameProperty;
typedef adjacency_list
Graph;
int main(){
Graph g;
property_map::type city_name = get(vertex_name, g);
property_map::type edge_value = get(edge_name, g);
typedef graph_traits<Graph>::vertex_descriptor Vertex;
typedef graph_traits<Graph>::edge_descriptor Edge;
Vertex v1;
v1 = add_vertex(g);
city_name[v1]= r;
}
error: no match for ‘operator=’ in
‘city_name.boost::vec_adj_list_vertex_property_map::operator[] [with Graph =
boost::adjacency_list, boost::no_property>,
boost::no_property, boost::listS>, GraphPtr =
boost::adjacency_list, boost::no_property>,
boost::no_property, boost::listS>*, ValueType =
boost::detail::error_property_not_found, Reference =
boost::detail::error_property_not_found&, Tag = boost::vertex_name_t](v1) =
r’
/home1/mutlu/boost/include/boost-1_37/boost/pending/detail/property.hpp:21:
note: candidates are: boost::detail::error_property_not_found&
boost::detail::error_property_not_found::operator=(const
boost::detail::error_property_not_found&)