diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-06-10 21:06:51 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-06-12 16:42:35 +0300 |
commit | 1d0b79df453e1e5c5c49a35549df9f350b3660ff (patch) | |
tree | 80811b95b4351bd2fd5b1b759850e786c9df1a75 /libbutl/path.hxx | |
parent | 334b37f48672b8d85700923bae493acb7db3060b (diff) |
Add tests and fixes for path_search(pattern,entry)
Diffstat (limited to 'libbutl/path.hxx')
-rw-r--r-- | libbutl/path.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libbutl/path.hxx b/libbutl/path.hxx index 56e43cf..b1ba31a 100644 --- a/libbutl/path.hxx +++ b/libbutl/path.hxx @@ -756,6 +756,14 @@ namespace butl iterator (const data_type* p, size_type b, size_type e) : p_ (p), b_ (b), e_ (e) {} + // Create an iterator by "rebasing" an old iterator onto a new path + // object. Can, for example, be used to "move" an iterator when moving + // the path object. Note: potentially dangerous if the old iterator used + // to point to a different path. + // + iterator (const basic_path& p, const iterator& i) + : p_ (&p), b_ (i.b_), e_ (i.e_) {} + iterator& operator++ () { |