Use <unordered_set> where available
This commit is contained in:
parent
ea5477e43d
commit
09aa2c9418
|
@ -33,4 +33,5 @@ endfunction()
|
|||
|
||||
if(CMAKE_CXX_STANDARD)
|
||||
cm_check_cxx_feature(unordered_map)
|
||||
cm_check_cxx_feature(unordered_set)
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#include <unordered_set>
|
||||
int main()
|
||||
{
|
||||
std::unordered_set<int> set;
|
||||
set.insert(0);
|
||||
return 0;
|
||||
}
|
|
@ -30,6 +30,7 @@
|
|||
#cmakedefine CMAKE_USE_MACH_PARSER
|
||||
#cmakedefine CMAKE_ENCODING_UTF8
|
||||
#cmakedefine CMake_HAVE_CXX_UNORDERED_MAP
|
||||
#cmakedefine CMake_HAVE_CXX_UNORDERED_SET
|
||||
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
|
||||
#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
|
||||
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
#include "assert.h"
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
|
||||
#include <unordered_set>
|
||||
#define UNORDERED_SET std::unordered_set
|
||||
#elif defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include <cmsys/hash_set.hxx>
|
||||
#define UNORDERED_SET cmsys::hash_set
|
||||
#else
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
#include <map>
|
||||
#include <set>
|
||||
#include <stdlib.h> // required for atof
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
|
||||
#if defined(CMake_HAVE_CXX_UNORDERED_SET)
|
||||
#include <unordered_set>
|
||||
#define UNORDERED_SET std::unordered_set
|
||||
#elif defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include <cmsys/hash_set.hxx>
|
||||
#define UNORDERED_SET cmsys::hash_set
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue