Boost logo

Boost :

Subject: [boost] [filesystem] : basic_path : Feature request
From: Rob (robrimmer_at_[hidden])
Date: 2009-02-06 09:56:29


Whilst using filesystem::path (v1.37) , I found I wanted the following
functionality:

 

Typedefs added for reference and const_reference and a push_back function,
as follows

 

typedef string_type& reference;

typedef const string_type& const_reference;

                

inline void push_back(const_reference path)

{

*this /= path;

}

 

This would allow use of std::back_inserter with stl algorithms such as

 

Boost::filesystem::path src("dir1/./dir2");

Boost::filesystem::path target;

 

Std::remove_copy(src.begin(), src.end(), std::back_inserter(target), ".");

 

I would also like to see pop_back() but this may not be as simple to
implement, I'll have to check the code

 

Rob

 

PS - My first post so I hope I'm on the right list, right message format,
etc.


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