1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 10:47:59 +08:00

cmList: fix swap function definition

swap function should be in the same namespace as the cmList class.

Reported by https://pvs-studio.com/en/blog/posts/cpp/1277/ (N1)

Issue: #27159
This commit is contained in:
Marc Chevrier
2025-08-21 17:02:39 +02:00
parent d296bf6b70
commit 071e8678de

View File

@@ -1319,12 +1319,10 @@ inline std::vector<std::string>& operator+=(std::vector<std::string>& l,
return l;
}
namespace std {
inline void swap(cmList& lhs, cmList& rhs) noexcept
{
lhs.swap(rhs);
}
} // namespace std
namespace cm {
inline void erase(cmList& list, std::string const& value)