Re: [Boost-bugs] [Boost C++ Libraries] #5403: filesystem3::recursive_directory_iterator::increment(system::error_code& ec) unexpected behaviour

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5403: filesystem3::recursive_directory_iterator::increment(system::error_code& ec) unexpected behaviour
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-02 08:57:27


#5403: filesystem3::recursive_directory_iterator::increment(system::error_code&
ec) unexpected behaviour
--------------------------------------+-------------------------------------
  Reporter: ttan@… | Owner: bemandawes
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: filesystem
   Version: Boost Development Trunk | Severity: Showstopper
Resolution: | Keywords: recursive_directory_iterator increment
--------------------------------------+-------------------------------------

Comment (by ttan@…):

 The way to achieve skipping inaccessible directory in the client code
 without patching Boost is to follow this pattern:


 {{{
     for (recursive_directory_iterator itr(root, ec), itr_end;
 itr!=itr_end;/* itr++*/)
     {
         // do stuff

         // replace ++itr with a no-throw version and
         // pop this directory out to resume with the next one
         itr.increment(ec);
         if(ec) itr.pop();
     }
 }}}

 it works on my trials. Help it's helpful to others as well

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5403#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC