# HG changeset patch # User marci # Date 1079970785 0 # Node ID cb87fb9d4c9486d0fec9338ae270bdf0446a3e67 # Parent f62f11c9e6df9796b01dcaa69cd937ba6afd400e . diff -r f62f11c9e6df -r cb87fb9d4c94 src/work/list_graph.h --- a/src/work/list_graph.h Mon Mar 22 13:08:24 2004 +0000 +++ b/src/work/list_graph.h Mon Mar 22 15:53:05 2004 +0000 @@ -45,8 +45,9 @@ G(_G), container(G.node_id, a) { } void set(Node n, T a) { container[/*G.id(n)*/n.node->id]=a; } T get(Node n) const { return container[/*G.id(n)*/n.node->id]; } - T& operator[](Node n) { return container[/*G.id(n)*/n.node->id]; } - const T& operator[](Node n) const { + std::vector::reference operator[](Node n) { + return container[/*G.id(n)*/n.node->id]; } + std::vector::const_reference operator[](Node n) const { return container[/*G.id(n)*/n.node->id]; } void update() { container.resize(G.node_id); } @@ -65,8 +66,9 @@ G(_G), container(G.edge_id, a) { } void set(Edge e, T a) { container[/*G.id(e)*/e.edge->id]=a; } T get(Edge e) const { return container[/*G.id(e)*/e.edge->id]; } - T& operator[](Edge e) { return container[/*G.id(e)*/e.edge->id]; } - const T& operator[](Edge e) const { + std::vector::reference operator[](Edge e) { + return container[/*G.id(e)*/e.edge->id]; } + std::vector::const_reference operator[](Edge e) const { return container[/*G.id(e)*/e.edge->id]; } void update() { container.resize(G.edge_id); }