| //===----------------------------------------------------------------------===// |
| // 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. |
| //===----------------------------------------------------------------------===// |
| // UNSUPPORTED: libcpp-no-exceptions |
| // template<class E> exception_ptr make_exception_ptr(E e); |
| A(int data = 0) : data_(data) {++constructed;} |
| A(const A& a) : data_(a.data_) {++constructed;} |
| std::exception_ptr p = std::make_exception_ptr(A(5)); |
| std::rethrow_exception(p); |
| assert(A::constructed == 1); |
| assert(A::constructed == 1); |
| assert(A::constructed == 0); |