aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--butl/path7
1 files changed, 7 insertions, 0 deletions
diff --git a/butl/path b/butl/path
index 62cadad..db77563 100644
--- a/butl/path
+++ b/butl/path
@@ -236,6 +236,7 @@ namespace butl
typedef path_traits<C> traits;
struct iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
// Construct special empty path. Note that we have to provide our
// own implementation rather than using '=default' to make clang
@@ -263,6 +264,9 @@ namespace butl
//
basic_path (const iterator& begin, const iterator& end);
+ basic_path (const reverse_iterator& rbegin, const reverse_iterator& rend)
+ : basic_path (end.base (), begin.base ()) {}
+
void
swap (basic_path& p)
{
@@ -436,6 +440,9 @@ namespace butl
iterator begin () const;
iterator end () const;
+ reverse_iterator rbegin () const {return reverse_iterator (end ());}
+ reverse_iterator rend () const {return reverse_iterator (begin ());}
+
public:
// Normalize the path. This includes collapsing the '.' and '..'
// directories if possible, collapsing multiple directory