diff --git a/openvpn/common/enumdir.hpp b/openvpn/common/enumdir.hpp index 120ee4a43..f644778c9 100644 --- a/openvpn/common/enumdir.hpp +++ b/openvpn/common/enumdir.hpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -52,7 +53,7 @@ inline bool enum_dir(const std::string &dirname, { std::string fn(e->d_name); if (fn != "." && fn != "..") - std::invoke(func, fn); + std::invoke(func, std::move(fn)); } return true; }