src/work/marci/bug/ansi_pedantic_bug.cc
changeset 611 83530dad618a
parent 316 d9691d0102bd
equal deleted inserted replaced
0:dc03dadcdc65 1:5c0be79222cf
    25 protected:
    25 protected:
    26   Graph* graph;
    26   Graph* graph;
    27 public:
    27 public:
    28   GraphWrapper(Graph& _graph) : graph(&_graph) { }
    28   GraphWrapper(Graph& _graph) : graph(&_graph) { }
    29  
    29  
    30   template<typename T> class NodeMap : public Graph::NodeMap<T> { 
    30   template<typename T> class NodeMap : public Graph::template NodeMap<T> { 
       
    31     typedef typename Graph::template NodeMap<T> Parent;
    31   public:
    32   public:
    32     NodeMap(const GraphWrapper<Graph>& _G) :  
    33     NodeMap(const GraphWrapper<Graph>& _G) :  
    33       Graph::NodeMap<T>(*(_G.graph)) { }
    34       Parent(*(_G.graph)) { }
    34   };
    35   };
    35 };
    36 };
    36 
    37 
    37 template<typename Graph>
    38 template<typename Graph>
    38 class ResGraphWrapper : public GraphWrapper<Graph> {
    39 class ResGraphWrapper : public GraphWrapper<Graph> {
    45   typedef ResGraphWrapper<const Graph> ResGW;
    46   typedef ResGraphWrapper<const Graph> ResGW;
    46 public:
    47 public:
    47   MaxFlow(const Graph& _g) : g(&_g) { }
    48   MaxFlow(const Graph& _g) : g(&_g) { }
    48   void augmentOnShortestPath() {
    49   void augmentOnShortestPath() {
    49     ResGW res_graph(*g);
    50     ResGW res_graph(*g);
    50     typename ResGW::NodeMap<int> pred(res_graph); 
    51     typename ResGW::template NodeMap<int> pred(res_graph); 
    51   }
    52   }
    52 };
    53 };
    53 
    54 
    54 int main(int, char **) {
    55 int main(int, char **) {
    55   ListGraph G;
    56   ListGraph G;