Boost logo

Boost :

From: Hugo Duncan (hugoduncan_at_[hidden])
Date: 2003-09-29 10:08:10


Hi,

I am having a problem on bcc564 with the latest changes to
depth_first_search.

The following seems to fix the problem (and doesn't seem to break gcc3.2,
vc7.1)
though I couldn't immeadiately see a test case that exercises "func".

Hugo

Index: depth_first_search.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/graph/depth_first_search.hpp,v
retrieving revision 1.37
diff -u -c -r1.37 depth_first_search.hpp
cvspserver server: conflicting specifications of output style
*** depth_first_search.hpp 28 Aug 2003 16:34:20 -0000 1.37
--- depth_first_search.hpp 29 Sep 2003 13:56:06 -0000
***************
*** 127,133 ****
         put(color, u, Color::gray());
         vis.discover_vertex(u, g);
         tie(ei, ei_end) = out_edges(u, g);
! if (static_cast<TF&>(func)(u, g)) {
             // If this vertex terminates the search, we push empty range
             stack.push_back(std::make_pair(u, std::make_pair(ei_end,
ei_end)));
         } else {
--- 127,134 ----
         put(color, u, Color::gray());
         vis.discover_vertex(u, g);
         tie(ei, ei_end) = out_edges(u, g);
! TF& fn(static_cast<TF&>(func));
! if (fn(u, g)) {
             // If this vertex terminates the search, we push empty range
             stack.push_back(std::make_pair(u, std::make_pair(ei_end,
ei_end)));
         } else {
***************
*** 149,155 ****
               put(color, u, Color::gray());
               vis.discover_vertex(u, g);
               tie(ei, ei_end) = out_edges(u, g);
! if (static_cast<TF&>(func)(u, g)) {
                   ei = ei_end;
               }
             } else if (v_color == Color::gray()) {
--- 150,156 ----
               put(color, u, Color::gray());
               vis.discover_vertex(u, g);
               tie(ei, ei_end) = out_edges(u, g);
! if (fn(u, g)) {
                   ei = ei_end;
               }
             } else if (v_color == Color::gray()) {


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