Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:13:46

0001 //===----------------------------------------------------------------------===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef _LIBCPP___EXCEPTION_OPERATIONS_H
0010 #define _LIBCPP___EXCEPTION_OPERATIONS_H
0011 
0012 #include <__config>
0013 
0014 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0015 #  pragma GCC system_header
0016 #endif
0017 
0018 namespace std { // purposefully not using versioning namespace
0019 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) ||                             \
0020     defined(_LIBCPP_BUILDING_LIBRARY)
0021 using unexpected_handler = void (*)();
0022 _LIBCPP_EXPORTED_FROM_ABI unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
0023 _LIBCPP_EXPORTED_FROM_ABI unexpected_handler get_unexpected() _NOEXCEPT;
0024 [[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void unexpected();
0025 #endif
0026 
0027 using terminate_handler = void (*)();
0028 _LIBCPP_EXPORTED_FROM_ABI terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
0029 _LIBCPP_EXPORTED_FROM_ABI terminate_handler get_terminate() _NOEXCEPT;
0030 
0031 #if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION)
0032 _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX17 bool uncaught_exception() _NOEXCEPT;
0033 #endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_UNCAUGHT_EXCEPTION)
0034 _LIBCPP_EXPORTED_FROM_ABI int uncaught_exceptions() _NOEXCEPT;
0035 
0036 class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
0037 
0038 _LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
0039 [[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
0040 } // namespace std
0041 
0042 #endif // _LIBCPP___EXCEPTION_OPERATIONS_H