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:

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

MutableMultiGraph
  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!

Cheers,

Jeremy


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