Hello Nat, Bidirectional Iterators and rbegin/rend are not necessarily the same thing. The bidirectional property only guarantees that the operator-- is supported [1] additionally to the ++ operator. [1] http://www.sgi.com/tech/stl/BidirectionalIterator.html cheers Sebastian
On Thu, Nov 1, 2012 at 11:55 AM, Joshua Boyce
wrote: On Thu, Nov 1, 2012 at 4:07 AM, Nat Linden
wrote: Am I correct? Given the way some containers implement end(), I always feel nervous about decrementing end(). I'm happy to see that Boost.Filesystem's own tests guarantee that usage; but is there anything in the documentation that would have assured me of that? http://www.boost.org/doc/libs/1_49_0/libs/filesystem/v3/doc/reference.html#p...
"A path::iterator is a constant iterator satisfying all the requirements of a bidirectional iterator (C++ Std, 24.1.4 Bidirectional iterators [lib.bidirectional.iterators])." Until I can dig up a copy of the standard -- pardon me, but this feels slightly divergent from the question I'm asking. Does the standard's description of "bidirectional iterators" guarantee the operations legal on the value returned by a container's end() method?
The only operation I feel confident assuming on a value returned by a container's end() method is [in]equality comparison with another iterator value.
(Of course, this discussion would be moot if boost::filesystem::path supported rbegin() and rend() methods... hint, hint...) _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users