diff --git a/lib/pathmatch.cpp b/lib/pathmatch.cpp index b7d78f048df..5dd11e1d755 100644 --- a/lib/pathmatch.cpp +++ b/lib/pathmatch.cpp @@ -33,7 +33,7 @@ PathMatch::PathMatch(std::vector patterns, std::string basepath, Sy bool PathMatch::match(const std::string &path, Filemode mode) const { - return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [=] (const std::string &pattern) { + return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [&] (const std::string &pattern) { return match(pattern, path, mBasepath, mode, mSyntax); }); }