summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-28 09:50:18 -0400
committerBrad King <brad.king@kitware.com>2017-09-28 09:50:18 -0400
commitb8018135b5729b5c74a0c95ab2b8cc8677fbe5b8 (patch)
treed4c9f1bf34bcfc2e6094e0a84def5ea249cf0b78 /Source
parent42f4e6974c99cfdd6727f2fcd35c83f431ab10a5 (diff)
downloadcmake-b8018135b5729b5c74a0c95ab2b8cc8677fbe5b8.tar.gz
Use C++11 '= delete' instead of CM_EQ_DELETE
We now require C++11 support including `= delete`. Drop use of the old compatibility macro.
Diffstat (limited to 'Source')
-rw-r--r--Source/Checks/cm_cxx_eq_delete.cxx14
-rw-r--r--Source/Checks/cm_cxx_features.cmake1
-rw-r--r--Source/cmConfigure.cmake.h.in11
-rw-r--r--Source/cmSourceFileLocation.h3
4 files changed, 3 insertions, 26 deletions
diff --git a/Source/Checks/cm_cxx_eq_delete.cxx b/Source/Checks/cm_cxx_eq_delete.cxx
deleted file mode 100644
index 809e4cfcf3..0000000000
--- a/Source/Checks/cm_cxx_eq_delete.cxx
+++ /dev/null
@@ -1,14 +0,0 @@
-struct Foo
-{
- Foo() {}
- ~Foo() {}
- Foo(Foo const&) = delete;
- Foo& operator=(Foo const&) = delete;
- int test() const { return 0; }
-};
-
-int main()
-{
- Foo const foo;
- return foo.test();
-}
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 7755cfed90..a30a5e6900 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -41,7 +41,6 @@ function(cm_check_cxx_feature name)
endif()
endfunction()
-cm_check_cxx_feature(eq_delete)
cm_check_cxx_feature(fallthrough)
if(NOT CMake_HAVE_CXX_FALLTHROUGH)
cm_check_cxx_feature(gnu_fallthrough)
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 5f3110c4cc..9a78aca36b 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -19,7 +19,6 @@
#cmakedefine HAVE_UNSETENV
#cmakedefine CMAKE_USE_ELF_PARSER
#cmakedefine CMAKE_USE_MACH_PARSER
-#cmakedefine CMake_HAVE_CXX_EQ_DELETE
#cmakedefine CMake_HAVE_CXX_FALLTHROUGH
#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH
#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH
@@ -27,12 +26,6 @@
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
-#ifdef CMake_HAVE_CXX_EQ_DELETE
-#define CM_EQ_DELETE = delete
-#else
-#define CM_EQ_DELETE
-#endif
-
#if defined(CMake_HAVE_CXX_FALLTHROUGH)
#define CM_FALLTHROUGH [[fallthrough]]
#elif defined(CMake_HAVE_CXX_GNU_FALLTHROUGH)
@@ -44,7 +37,7 @@
#endif
#define CM_DISABLE_COPY(Class) \
- Class(Class const&) CM_EQ_DELETE; \
- Class& operator=(Class const&) CM_EQ_DELETE;
+ Class(Class const&) = delete; \
+ Class& operator=(Class const&) = delete;
#endif
diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h
index fb5b3301d5..467682db9f 100644
--- a/Source/cmSourceFileLocation.h
+++ b/Source/cmSourceFileLocation.h
@@ -90,8 +90,7 @@ private:
void Update(cmSourceFileLocation const& loc);
void UpdateExtension(const std::string& name);
- cmSourceFileLocation& operator=(const cmSourceFileLocation& loc)
- CM_EQ_DELETE;
+ cmSourceFileLocation& operator=(const cmSourceFileLocation& loc) = delete;
};
#endif