Subject: Re: [boost] [graph] strong_components & depth_first_visit feature proposal
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2014-08-27 18:01:52
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.
>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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk