|
Boost : |
From: artwisz_at_[hidden]
Date: 2001-03-25 15:28:46
Hello again,
I am having some strange behaviour with VC++...
I am playing with the interior_property_map.cpp example. Wrote a
simple function to illustrate the case:
template<class Graph>
void tryIt(const Graph& g)
{
typedef typename property_map<Graph, vertex_first_name_t>
::const_type NamePA;
NamePA name = get(vertex_first_name, g);
string nm = boost::get(vertex_first_name, g, 1);
}
and invoke
tryIt(G);
from main(). This works. But then comment out
//NamePA name = get(vertex_first_name, g);
and I get the (abbreviated somehow) errors below. I would like to use
the 3 argument get without getting the copy of the map.
Perhaps my library version is too old ?...
TIA,
Artur
e:\c++lib\boost\property_map.hpp(283) : error C2676:
binary '[' : 'const struct
boost::vec_adj_list_vertex_property_map<class
boost::adjacency_list<...>,class boost::adjacency_list<...> const
&,struct
boost::property<enum vertex_first_name_t,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >,struct boost::no_property>,enum
vertex_first_name_t>' does not define this operator or a conversion
to a type acceptable
to the predefined operator
e:\c++lib\boost\graph\detail\adjacency_list.hpp(1439) : see
reference to function template instantiation 'class
std::basic_string<...> __cdecl boost::get(const struct boost::put_get_
at_helper<class std::basic_string<...>,struct
boost::vec_adj_list_vertex_property_map<class
boost::adjacency_list<...>,class boost::adjacency_list<...> const
&,struct boost::property<...>,struct boost::no_property>,enum
vertex_first_name_t> > &,const int &)' being compiled
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk