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<Graph, GraphPtr, ValueType, Reference, Tag>::operator[] [with Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, relation, boost::property<boost::edge_name_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::no_property>, boost::no_property, boost::listS>, GraphPtr = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, relation, boost::property<boost::edge_name_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 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<edge_name_t, std::string> EdgeNameProperty;
typedef adjacency_list<vecS, vecS, directedS, relation, EdgeNameProperty> Graph;
int main(){
Graph g;
property_map<Graph, vertex_name_t>::type city_name = get(vertex_name, g);
property_map<Graph, edge_name_t>::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<Graph, GraphPtr, ValueType, Reference, Tag>::operator[] [with Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, relation, boost::property<boost::edge_name_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::no_property>, boost::no_property, boost::listS>, GraphPtr = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, relation, boost::property<boost::edge_name_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, 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&)