1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-exceptions
10 // test uncaught_exception
15 #include "test_macros.h"
21 assert(std::uncaught_exception());
29 // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#475
30 assert(!std::uncaught_exception());
39 assert(!std::uncaught_exception());
44 assert(!std::uncaught_exception());
46 assert(!std::uncaught_exception());