Commit 09aa2c94 authored by Daniel Pfeifer's avatar Daniel Pfeifer Committed by Brad King
Browse files

Use <unordered_set> where available

parent ea5477e4
......@@ -33,4 +33,5 @@ endfunction()
if(CMAKE_CXX_STANDARD)
cm_check_cxx_feature(unordered_map)
cm_check_cxx_feature(unordered_set)
endif()
#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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment