mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 03:48:02 +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:
@@ -1319,12 +1319,10 @@ inline std::vector<std::string>& operator+=(std::vector<std::string>& l,
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace std {
|
|
||||||
inline void swap(cmList& lhs, cmList& rhs) noexcept
|
inline void swap(cmList& lhs, cmList& rhs) noexcept
|
||||||
{
|
{
|
||||||
lhs.swap(rhs);
|
lhs.swap(rhs);
|
||||||
}
|
}
|
||||||
} // namespace std
|
|
||||||
|
|
||||||
namespace cm {
|
namespace cm {
|
||||||
inline void erase(cmList& list, std::string const& value)
|
inline void erase(cmList& list, std::string const& value)
|
||||||
|
Reference in New Issue
Block a user