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 // class auto_ptr<void>;
16 //
17 // template <class X>
18 // class auto_ptr_ref;
19 //
20 // Deprecated in C++11
21
22 // UNSUPPORTED: clang-4.0
23 // UNSUPPORTED: c++98, c++03
24 // REQUIRES: verify-support
25
26 // MODULES_DEFINES: _LIBCPP_ENABLE_DEPRECATION_WARNINGS
27 // MODULES_DEFINES: _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
28 #define _LIBCPP_ENABLE_DEPRECATION_WARNINGS
29 #define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
30
31 #include <memory>
32 #include "test_macros.h"
33
main()34 int main()
35 {
36 typedef std::auto_ptr<int> AP; // expected-error{{'auto_ptr<int>' is deprecated}}
37 typedef std::auto_ptr<void> APV; // expected-error{{'auto_ptr<void>' is deprecated}}
38 typedef std::auto_ptr_ref<int> APR; // expected-error{{'auto_ptr_ref<int>' is deprecated}}
39 }
40