Skip to content

Commit 006ebc8

Browse files
committed
pathmatch.cpp: fixed -Wdeprecated-this-capture Clang C++20 warning [skip ci]
1 parent 2d0326d commit 006ebc8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmake/cxx11.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ macro(use_cxx11)
33
# Boost.Math requires C++14
44
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to use")
55
else()
6-
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use")
6+
set(CMAKE_CXX_STANDARD 20 CACHE STRING "C++ standard to use")
77
endif()
88
endmacro()

lib/pathmatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PathMatch::PathMatch(std::vector<std::string> patterns, std::string basepath, Sy
3333

3434
bool PathMatch::match(const std::string &path, Filemode mode) const
3535
{
36-
return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [=] (const std::string &pattern) {
36+
return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [&] (const std::string &pattern) {
3737
return match(pattern, path, mBasepath, mode, mSyntax);
3838
});
3939
}

0 commit comments

Comments
 (0)