mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
Merge topic 'iwyu-std-hash'
aefb8559dc IWYU: Fix workaround mapping for std::hash
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2267
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "cm_kwiml.h"
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@@ -15,14 +16,12 @@
|
||||
// IWYU insists we should forward-declare instead of including <functional>,
|
||||
// but we cannot forward-declare reliably because some C++ standard libraries
|
||||
// put the template in an inline namespace.
|
||||
#ifdef CMAKE_IWYU
|
||||
#ifdef CMAKE_IWYU_FORWARD_STD_HASH
|
||||
/* clang-format off */
|
||||
namespace std {
|
||||
template <class T> struct hash;
|
||||
}
|
||||
/* clang-format on */
|
||||
#else
|
||||
# include <functional>
|
||||
#endif
|
||||
|
||||
#include "cmFindCommon.h"
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
// Get rid of some windows macros:
|
||||
|
||||
Reference in New Issue
Block a user