aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-02 13:05:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-02 13:05:41 +0200
commit1690169dcefcc6fe6249221c4c08cb371cc700fc (patch)
tree7e695f5fa36f308f8690cce050582214ca71d7d4
parent0a66425150762862a39e570dfee9def821ec5542 (diff)
Make dir_iterator move-ctor noexcept, revert previous workaround
-rw-r--r--libbutl/filesystem.cxx7
-rw-r--r--libbutl/filesystem.hxx2
-rw-r--r--libbutl/filesystem.ixx2
3 files changed, 2 insertions, 9 deletions
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx
index b6b6b5b..6a64073 100644
--- a/libbutl/filesystem.cxx
+++ b/libbutl/filesystem.cxx
@@ -1229,14 +1229,7 @@ namespace butl
bool self_;
bool follow_symlinks_;
preopen preopen_;
-
- // @@ Some issue with libc++ (reproducible on FreeBSD 11 with Clang 3.8).
- //
-#ifdef _LIBCPP_VERSION
- std::vector<pair<dir_iterator, dir_path>> iters_;
-#else
small_vector<pair<dir_iterator, dir_path>, 1> iters_;
-#endif
};
// Search for paths matching the pattern and call the specified function for
diff --git a/libbutl/filesystem.hxx b/libbutl/filesystem.hxx
index bf1b3af..4fa1021 100644
--- a/libbutl/filesystem.hxx
+++ b/libbutl/filesystem.hxx
@@ -434,7 +434,7 @@ namespace butl
dir_iterator (const dir_iterator&) = delete;
dir_iterator& operator= (const dir_iterator&) = delete;
- dir_iterator (dir_iterator&& x);
+ dir_iterator (dir_iterator&&) noexcept;
dir_iterator& operator= (dir_iterator&&);
dir_iterator& operator++ () {next (); return *this;}
diff --git a/libbutl/filesystem.ixx b/libbutl/filesystem.ixx
index 43fef20..eb9984b 100644
--- a/libbutl/filesystem.ixx
+++ b/libbutl/filesystem.ixx
@@ -108,7 +108,7 @@ namespace butl
// dir_iterator
//
inline dir_iterator::
- dir_iterator (dir_iterator&& x)
+ dir_iterator (dir_iterator&& x) noexcept
: e_ (std::move (x.e_)), h_ (x.h_)
{
#ifndef _WIN32