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> class auto_ptr;
13
14// template<class Y> operator auto_ptr<Y>() throw();
15
16#include <memory>
17#include <cassert>
18
19#include "../AB.h"
20
21std::auto_ptr<B>
22source()
23{
24    return std::auto_ptr<B>(new B(1));
25}
26
27void
28test()
29{
30    std::auto_ptr<A> ap2(source());
31}
32
33int main()
34{
35    test();
36}
37