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 // public:
16 //   typedef X element_type;
17 //   ...
18 // };
19 
20 #include <memory>
21 #include <type_traits>
22 
23 template <class T>
24 void
test()25 test()
26 {
27     static_assert((std::is_same<typename std::auto_ptr<T>::element_type, T>::value), "");
28     std::auto_ptr<T> p;
29     ((void)p);
30 }
31 
main()32 int main()
33 {
34     test<int>();
35     test<double>();
36     test<void>();
37 }
38