Boost logo

Boost :

Subject: Re: [boost] [BGL] on using visitor in dijkstra_shortest_path
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-07-02 11:39:37


> It gives following errors:
>
> In file included from main.cpp:6:
> debugDijkstra.hpp:30: error: expected constructor, destructor, or type
> conversion before ‘<’ token
>
> at the location:
> template <class PredecessorMap> record_predecessors<PredecessorMap> //error
> here
> make_predecessor_recorder(PredecessorMap p) {
>

Sorry. I didn't sere the comments the first time.

This code is basically defining a class that has the same name as a function
(record_predecessors) that is already defined in the BGL. Change the name of
the class (and constructor) and it should work fine. It did for me.

Or you could just use the predecessor_recorder class, which is created by
the record_predecessor function :)

Andrew Sutton
andrew.n.sutton_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk