Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-08-29 20:06:55

Gary Powell writes:
> Also what is the point of returning a pair<TYPE,bool> when the bool is
> always "true"? (dynamic_graph.cct)

The MutableGraph concept defines the return type for add_edge() to be
pair<edge_descriptor,bool>. When the graph disallows parallel edges,
the bool is important, otherwise it will always be true. I suppose
I could have split the interface:

  pair<edge_descriptor,bool> add_edge(...)

  edge_descriptor add_edge(...)

But I didn't think it was worth the effort, and could get in the way
of some generic algorithms. Perhaps this was the wrong choice? The
standard went with different interfaces for set/multiset but I always
thought that was annoying.

Thanks for the comments!



Boost list run by bdawes at, gregod at, cpdaniel at, john at