1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // XFAIL: libcpp-no-exceptions
13 // class nested_exception;
15 // nested_exception(const nested_exception&) throw() = default;
24 explicit A(int data) : data_(data) {}
26 friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;}
32 std::nested_exception e0;
33 std::nested_exception e = e0;
34 assert(e.nested_ptr() == nullptr);
44 std::nested_exception e0;
45 std::nested_exception e = e0;
46 assert(e.nested_ptr() != nullptr);
49 rethrow_exception(e.nested_ptr());