Boost logo

Boost Users :

From: BomBielFil (bombielfil_at_[hidden])
Date: 2008-02-06 07:02:22


Hi
I've a problem whit "put" function. My simple code is:
--------------------------
typedef Is_finite<Triangulation> Filter;
typedef boost::filtered_graph<Triangulation,Filter,Filter>
Finite_triangulation;
typedef boost::graph_traits<Finite_triangulation>::vertex_descriptor
vertex_descriptor;
typedef boost::graph_traits<Finite_triangulation>::vertex_iterator
vertex_iterator;
typedef boost::graph_traits<Finite_triangulation>::edge_descriptor
edge_descriptor;
typedef boost::graph_traits<Finite_triangulation>::edge_iterator
edge_iterator;

int main(int,char*[])
{
  Triangulation t;
  Filter is_finite(t);
  Finite_triangulation ft(t, is_finite, is_finite); //graph

  t.insert(Point(0.4, 1));
  t.insert(Point(1, 0.3));
  t.insert(Point(0.0, -0.9));
  t.insert(Point(-1, 0));
  t.insert(Point(1, 2));

  boost::property_map<Triangulation,boost::edge_weight_t>::type
weight_map=get(boost::edge_weight,ft);

  edge_iterator eit,eend;
for (boost::tie(eit,eend)=boost::edges(ft); eit!=eend; ++eit)
  {
     std::cout << "PESO: " << get(weight_map,*eit) << "\n";
     put(weight_map,*eit ,100);
     std::cout << "PESO2: " << get(weight_map,*eit) << "\n";
  }
return 0;
}
------

at compile time I've: "/property_map.hpp:319: error: invalid lvalue in
assignment"
Why get is right and put no??Can help me??

Best regards
-Bombielfil-



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net