Boost logo

Boost Users :

From: Giulio Veronesi (giulio_veronesi_at_[hidden])
Date: 2005-09-14 11:01:57


Hi all,

I'm enjoying learning the boost graph library. I'm
trying to use the Dijkstra algorithm and try to store
the shortest path as explained in the subsection
"Extending Algorithms with Visitors" of the section
"Quick Tour" of the BGL user guide.

When I try to compile my code, I get the following
error message:

mesh.cpp:38: error: expected constructor, destructor,
or type conversion before '<' token
mesh.cpp:38: error: expected `;' before '<' token

where line 38 is highlighted in the following portion
of code.

Could you help me to resolve this problem?

Thanks in advance,
Giulio

template <class PredecessorMap>
class record_predecessors : public dijkstra_visitor<>
  {
  public:
    record_predecessors(PredecessorMap p)
      : m_predecessor(p) { }

    template <class Edge, class Graph>
    void edge_relaxed(Edge e, Graph& g) {
      // set the parent of the target(e) to source(e)
      put(m_predecessor, target(e, g), source(e, g));
    }
  protected:
    PredecessorMap m_predecessor;
  };

template <class PredecessorMap>
line 38: record_predecessors<PredecessorMap>
make_predecessor_recorder(PredecessorMap p)
{
  return record_predecessors<PredecessorMap>(p);
}

        

        
                
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it


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