|
Boost Users : |
From: Jeremy Siek (jeremy.siek_at_[hidden])
Date: 2005-09-14 19:38:48
Hi Giulio,
Glad you're enjoying the BGL :)
Hmm, I don't see anything wrong... perhaps the error is even
earlier in the source file, causing the compiler's parser
to become very confused.
If you want more help you'll need to send us a complete
program that we can compile. Also, you'll need to tell
us the compiler and its version number.
Cheers,
Jeremy
On Sep 14, 2005, at 11:01 AM, Giulio Veronesi wrote:
> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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