From 8564b2f8b0d563a2c328a09916e9e4e3def5978f Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 1 Apr 2018 11:29:07 +0200 Subject: #193 Dropped support for boot::shared_ptr<>, enabled C++11 support in CMake --- .../cxx11-test-rvalue-references.cpp | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-rvalue-references.cpp (limited to 'cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-rvalue-references.cpp') diff --git a/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-rvalue-references.cpp b/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-rvalue-references.cpp deleted file mode 100644 index e6e7e5a9..00000000 --- a/cmake/cmake-cxx11/Modules/CheckCXX11Features/cxx11-test-rvalue-references.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include - -class rvmove { -public: - void *ptr; - char *array; - - rvmove() - : ptr(0), - array(new char[10]) - { - ptr = this; - } - - rvmove(rvmove &&other) - : ptr(other.ptr), - array(other.array) - { - other.array = 0; - other.ptr = 0; - } - - ~rvmove() - { - assert(((ptr != 0) && (array != 0)) || ((ptr == 0) && (array == 0))); - delete[] array; - } - - rvmove &operator=(rvmove &&other) - { - delete[] array; - ptr = other.ptr; - array = other.array; - other.array = 0; - other.ptr = 0; - return *this; - } - - static rvmove create() - { - return rvmove(); - } -private: - rvmove(const rvmove &); - rvmove &operator=(const rvmove &); -}; - -int main() -{ - rvmove mine; - if (mine.ptr != &mine) - return 1; - mine = rvmove::create(); - if (mine.ptr == &mine) - return 1; - return 0; -} -- cgit v1.2.3