Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-27 01:18:19

Doug Gregor wrote:

> On Sep 25, 2004, at 8:26 AM, Vladimir Prus wrote:
>> At the moment, it's not possible to pass the object returned by
>> boost::ref as
>> visitor to the breadth_first_search function. So, if visitor has
>> state, I
>> need to hold that state by pointer, which is inconvenient.
>> Any opinions on the attached patch? Unless there are any objections,
>> I'll
>> commit it after we branch for release.
> Sure, after the branch. Weird name for a type, this 'realBFSVisitor'.
> You didn't want to use "real_bfs_visitor", or something else more
> Boost-like?

Well, this seems reasonable name to me, since it's directly derived from
BFSVisitor -- the template parameter. With "real_bfs_visitor" the relation
is less apparent.

Ah, and btw, the patch is incorrect. In 'breadth_first_search', I unwrap the
passed reference, and then pass the unwrapped visitor to
'breadth_first_visit', which will copy the visitor, and so on. That's
one-character fix, though.

- Volodya

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