Re: [boost] [graph] strong_components & depth_first_visit feature proposal
On Wed, Aug 27, 2014 2:39 AM EDT Alexander Lauser wrote:
* Another minor question: Why are not all events of a DFS-visitor optional (like finish_edge is)? I think this would make implementing a partial DFS-visitors easier (by not having to derive from dfs_visitor in order to provide events that one is not interested in).
Have you tried deriving from default_dfs_visitor?
Yes, but why only make finish_edge optional? I think it would make user-code (slightly) clearer if all events were optional. It's no big deal, of course, and that's why it's a minor question.
Alex
PS: For the background, I'm quite new to Boost and for me it is somewhat arbitrary that everything is mandatory but finish_edge. The reason, however, seems to be historical: I recently saw that, at least in Boost version <= 1.39, there was no finish_edge-event.
That is why it is (or at least is trying to be) optional. Visitors from before that event was added would become incorrect if it was not optional, leading to compatibility problems. Making all of the events optional would be possible as long as Boost.TTI could detect all of the signatures that are in use for them currently. -- Jeremiah Willcock
For the background, I'm quite new to Boost and for me it is somewhat arbitrary that everything is mandatory but finish_edge. The reason, however, seems to be historical: I recently saw that, at least in Boost version <= 1.39, there was no finish_edge-event.
That is why it is (or at least is trying to be) optional. Visitors from before that event was added would become incorrect if it was not optional, leading to compatibility problems. Making all of the events optional would be possible as long as Boost.TTI could detect all of the signatures that are in use for them currently.
If it's possible for Boost.TTI to make finish_edge optional, then it is also possible for the other events; their signature is almost the same. IMO it is natural to make all events optional or none. - Alex
participants (2)
-
Alexander Lauser
-
Jeremiah Willcock