Remove auto_ptr in C++17. Get it back by defining _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292986 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2017-01-24 22:22:33 +00:00
parent bef26f787d
commit b4d17ade89
19 changed files with 81 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <memory>
// template <class X>
// class auto_ptr;
//
// In C++17, auto_ptr has been removed.
// However, for backwards compatibility, if _LIBCPP_NO_REMOVE_AUTOPTR
// is defined before including <memory>, then auto_ptr will be restored.
#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
#include <memory>
#include <type_traits>
int main()
{
std::auto_ptr<int> p;
}