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 //===----------------------------------------------------------------------===//
12 // class nested_exception;
14 // nested_exception(const nested_exception&) throw() = default;
23 explicit A(int data) : data_(data) {}
25 friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;}
31 std::nested_exception e0;
32 std::nested_exception e = e0;
33 assert(e.nested_ptr() == nullptr);
43 std::nested_exception e0;
44 std::nested_exception e = e0;
45 assert(e.nested_ptr() != nullptr);
48 rethrow_exception(e.nested_ptr());