Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-03-25 16:12:33

Hi Artur,

This is a compiler bug (see the BGL trouble shooting page), and I've given
up trying to find a way to make the 3 arg get() work on VC++. However,
there is a simple workaround:

get(get(vertex_first_name, g), 1)

Don't worry about making copies of the property map object... that is
suppose to be a fast operation.


On Sun, 25 Mar 2001 artwisz_at_[hidden] wrote:

artwis> Hello again,
artwis> I am having some strange behaviour with VC++...
artwis> I am playing with the interior_property_map.cpp example. Wrote a
artwis> simple function to illustrate the case:
artwis> template<class Graph>
artwis> void tryIt(const Graph& g)
artwis> {
artwis> typedef typename property_map<Graph, vertex_first_name_t>
artwis> ::const_type NamePA;
artwis> NamePA name = get(vertex_first_name, g);
artwis> string nm = boost::get(vertex_first_name, g, 1);
artwis> }
artwis> and invoke
artwis> tryIt(G);
artwis> from main(). This works. But then comment out
artwis> //NamePA name = get(vertex_first_name, g);
artwis> and I get the (abbreviated somehow) errors below. I would like to use
artwis> the 3 argument get without getting the copy of the map.
artwis> Perhaps my library version is too old ?...
artwis> TIA,
artwis> Artur
artwis> e:\c++lib\boost\property_map.hpp(283) : error C2676:
artwis> binary '[' : 'const struct
artwis> boost::vec_adj_list_vertex_property_map<class
artwis> boost::adjacency_list<...>,class boost::adjacency_list<...> const
artwis> &,struct
artwis> boost::property<enum vertex_first_name_t,class
artwis> std::basic_string<char,struct std::char_traits<char>,class
artwis> std::allocator<char> >,struct boost::no_property>,enum
artwis> vertex_first_name_t>' does not define this operator or a conversion
artwis> to a type acceptable
artwis> to the predefined operator
artwis> e:\c++lib\boost\graph\detail\adjacency_list.hpp(1439) : see
artwis> reference to function template instantiation 'class
artwis> std::basic_string<...> __cdecl boost::get(const struct boost::put_get_
artwis> at_helper<class std::basic_string<...>,struct
artwis> boost::vec_adj_list_vertex_property_map<class
artwis> boost::adjacency_list<...>,class boost::adjacency_list<...> const
artwis> &,struct boost::property<...>,struct boost::no_property>,enum
artwis> vertex_first_name_t> > &,const int &)' being compiled
artwis> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
artwis> Your use of Yahoo! Groups is subject to

 Jeremy Siek www:
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906

Boost list run by bdawes at, gregod at, cpdaniel at, john at