diff --git a/devel/include/wtr/watcher-/watch.hpp b/devel/include/wtr/watcher-/watch.hpp index 7664cb57..340e4826 100644 --- a/devel/include/wtr/watcher-/watch.hpp +++ b/devel/include/wtr/watcher-/watch.hpp @@ -58,7 +58,7 @@ class watch { event::callback const& callback) noexcept : watching{std::async( std::launch::async, - [=, this] + [this, path, callback] { auto abs_path_ec = std::error_code{}; auto abs_path = std::filesystem::absolute(path, abs_path_ec); diff --git a/include/wtr/watcher.hpp b/include/wtr/watcher.hpp index fcecee35..5f198b54 100644 --- a/include/wtr/watcher.hpp +++ b/include/wtr/watcher.hpp @@ -2192,7 +2192,7 @@ class watch { event::callback const& callback) noexcept : watching{std::async( std::launch::async, - [=, this] + [this, path, callback] { auto abs_path_ec = std::error_code{}; auto abs_path = std::filesystem::absolute(path, abs_path_ec);