Re: [Boost-bugs] [Boost C++ Libraries] #1976: Inverse function for complete

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1976: Inverse function for complete
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-08-21 23:52:36


#1976: Inverse function for complete
--------------------------------------+-------------------------------------
  Reporter: me22.ca+boost_at_[hidden] | Owner: bemandawes
      Type: Feature Requests | Status: new
 Milestone: Boost 1.36.0 | Component: filesystem
   Version: Boost 1.35.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment(by me22.ca+boost_at_[hidden]):

 An additional use case for this came up on the users list:
 [http://lists.boost.org/boost-users/2008/08/39597.php]

   The use case here is creating complete output paths for "copy-pasting a
 sub-tree from input_base_path to output_base_path" (ofcourse with some
 transformations along the way).

   For now, I am using

   {{{
   fs::wpath output_path=output_base_path;
   int k=0; for(fs::wpath::iterator
 i=input_path.begin();i!=input_path.end();i++,k++) if(k>=7)
 output_path/=(*i);
   }}}

   Again, 7 is the number of elements in input_base_path. advance() would
 make it atleast slightly cleaner (remove k, and the if on k), uncomplete
 would be ideal.

-- 
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1976#comment:1>
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:49:58 UTC