Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/c++/v1/exception is written in an unsupported language. File is not indexed.

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP_EXCEPTION
0011 #define _LIBCPP_EXCEPTION
0012 
0013 /*
0014     exception synopsis
0015 
0016 namespace std
0017 {
0018 
0019 class exception
0020 {
0021 public:
0022     exception() noexcept;
0023     exception(const exception&) noexcept;
0024     exception& operator=(const exception&) noexcept;
0025     virtual ~exception() noexcept;
0026     virtual const char* what() const noexcept;
0027 };
0028 
0029 class bad_exception
0030     : public exception
0031 {
0032 public:
0033     bad_exception() noexcept;
0034     bad_exception(const bad_exception&) noexcept;
0035     bad_exception& operator=(const bad_exception&) noexcept;
0036     virtual ~bad_exception() noexcept;
0037     virtual const char* what() const noexcept;
0038 };
0039 
0040 typedef void (*unexpected_handler)();
0041 unexpected_handler set_unexpected(unexpected_handler  f ) noexcept;
0042 unexpected_handler get_unexpected() noexcept;
0043 [[noreturn]] void unexpected();
0044 
0045 typedef void (*terminate_handler)();
0046 terminate_handler set_terminate(terminate_handler  f ) noexcept;
0047 terminate_handler get_terminate() noexcept;
0048 [[noreturn]] void terminate() noexcept;
0049 
0050 bool uncaught_exception()  noexcept;  // deprecated in C++17, removed in C++20
0051 int  uncaught_exceptions() noexcept;  // C++17
0052 
0053 typedef unspecified exception_ptr;
0054 
0055 exception_ptr current_exception() noexcept;
0056 void rethrow_exception [[noreturn]] (exception_ptr p);
0057 template<class E> exception_ptr make_exception_ptr(E e) noexcept;
0058 
0059 class nested_exception
0060 {
0061 public:
0062     nested_exception() noexcept;
0063     nested_exception(const nested_exception&) noexcept = default;
0064     nested_exception& operator=(const nested_exception&) noexcept = default;
0065     virtual ~nested_exception() = default;
0066 
0067     // access functions
0068     [[noreturn]] void rethrow_nested() const;
0069     exception_ptr nested_ptr() const noexcept;
0070 };
0071 
0072 template <class T> [[noreturn]] void throw_with_nested(T&& t);
0073 template <class E> void rethrow_if_nested(const E& e);
0074 
0075 }  // std
0076 
0077 */
0078 
0079 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0080 #  include <__cxx03/exception>
0081 #else
0082 #  include <__config>
0083 #  include <__exception/exception.h>
0084 #  include <__exception/exception_ptr.h>
0085 #  include <__exception/nested_exception.h>
0086 #  include <__exception/operations.h>
0087 #  include <__exception/terminate.h>
0088 #  include <version>
0089 
0090 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0091 #    pragma GCC system_header
0092 #  endif
0093 
0094 #  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
0095 #    include <cstddef>
0096 #    include <cstdlib>
0097 #    include <new>
0098 #    include <type_traits>
0099 #  endif
0100 #endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0101 
0102 #endif // _LIBCPP_EXCEPTION