]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
Vendor import of libc++ trunk r300422:
[FreeBSD/FreeBSD.git] / test / libcxx / depr / depr.auto.ptr / auto.ptr / auto_ptr.cxx1z.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <memory>
11
12 // template <class X>
13 // class auto_ptr;
14 //
15 //  In C++17, auto_ptr has been removed.
16 //  However, for backwards compatibility, if _LIBCPP_NO_REMOVE_AUTOPTR
17 //  is defined before including <memory>, then auto_ptr will be restored.
18
19 // MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
20
21 #define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
22
23 #include <memory>
24 #include <type_traits>
25
26 int main()
27 {
28     std::auto_ptr<int> p;
29 }