Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-03-10 11:35:01


At 08:02 PM 3/8/2002, Jan Langer wrote:

>i think there will be no result if we continue to discuss which "things"
>are actually returned by a root-iterator. but there is a need for such
>an special iterator. i read about four possible solutions:
>
>(1) directory_iterator (root_directory ()) // function returning string
>(2) directory_iterator (directory_iterator::roots); // enum
>(3) hierarchy_iterator::begin (); // own class
>(4) directory_iterator::roots (); // static member function
>
>what this construct actually returns is impl.defined.

Actually, it isn't what the construct returns, it is what dereferencing the
constructed iterator returns that is we don't want to overspecify. Which,
of course, is your main point.

On the other hand, if we can't give enough guidance to implementors so that
high quality implementations for a platform would return the same thing,
the feature starts to get less useful and more controversial.

Maybe we should set root-iteration aside for now and finish the better
defined portions of the library.

>i would prefer (4)
>because its short to write, quite easy to implement and doesn't need an
>additional class.

I could live with any of them, although I still think having a separate
hierarchy_iterator is overkill.

--Beman


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