]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/include/bits/functexcept.h
PR libstdc++/36104 part four
[thirdparty/gcc.git] / libstdc++-v3 / include / bits / functexcept.h
CommitLineData
e2c09482 1// Function-Based Exception Support -*- C++ -*-
725dc051 2
7c3e9502 3// Copyright (C) 2001, 2004, 2005, 2008, 2009, 2010, 2011
d652f226 4// Free Software Foundation, Inc.
725dc051
BK
5//
6// This file is part of the GNU ISO C++ Library. This library is free
7// software; you can redistribute it and/or modify it under the
8// terms of the GNU General Public License as published by the
748086b7 9// Free Software Foundation; either version 3, or (at your option)
725dc051
BK
10// any later version.
11
12// This library is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16
748086b7
JJ
17// Under Section 7 of GPL version 3, you are granted additional
18// permissions described in the GCC Runtime Library Exception, version
19// 3.1, as published by the Free Software Foundation.
20
21// You should have received a copy of the GNU General Public License and
22// a copy of the GCC Runtime Library Exception along with this program;
23// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24// <http://www.gnu.org/licenses/>.
725dc051 25
f910786b
BK
26/** @file bits/functexcept.h
27 * This is an internal header file, included by other library headers.
28 * Do not attempt to use it directly. @headername{exception}
29 *
0aa06b18
BK
30 * This header provides support for -fno-exceptions.
31 */
32
725dc051 33//
e2c09482 34// ISO C++ 14882: 19.1 Exception classes
725dc051
BK
35//
36
382c6e2d
BK
37#ifndef _FUNCTEXCEPT_H
38#define _FUNCTEXCEPT_H 1
39
3cbc7af0 40#include <bits/c++config.h>
7c3e9502 41#include <bits/exception_defines.h>
725dc051 42
12ffa228
BK
43namespace std _GLIBCXX_VISIBILITY(default)
44{
45_GLIBCXX_BEGIN_NAMESPACE_VERSION
3cbc7af0 46
ed6814f7 47 // Helper for exception objects in <except>
e2c09482 48 void
0554d39a 49 __throw_bad_exception(void) __attribute__((__noreturn__));
725dc051 50
ed6814f7 51 // Helper for exception objects in <new>
e2c09482 52 void
0554d39a 53 __throw_bad_alloc(void) __attribute__((__noreturn__));
725dc051 54
ed6814f7 55 // Helper for exception objects in <typeinfo>
e2c09482 56 void
0554d39a 57 __throw_bad_cast(void) __attribute__((__noreturn__));
725dc051 58
e2c09482 59 void
0554d39a 60 __throw_bad_typeid(void) __attribute__((__noreturn__));
725dc051 61
ed6814f7 62 // Helpers for exception objects in <stdexcept>
e2c09482 63 void
797308b2 64 __throw_logic_error(const char*) __attribute__((__noreturn__));
725dc051 65
e2c09482 66 void
797308b2 67 __throw_domain_error(const char*) __attribute__((__noreturn__));
725dc051 68
e2c09482 69 void
797308b2 70 __throw_invalid_argument(const char*) __attribute__((__noreturn__));
725dc051 71
e2c09482 72 void
797308b2 73 __throw_length_error(const char*) __attribute__((__noreturn__));
725dc051 74
e2c09482 75 void
797308b2 76 __throw_out_of_range(const char*) __attribute__((__noreturn__));
725dc051 77
e2c09482 78 void
797308b2 79 __throw_runtime_error(const char*) __attribute__((__noreturn__));
725dc051 80
e2c09482 81 void
797308b2 82 __throw_range_error(const char*) __attribute__((__noreturn__));
725dc051 83
e2c09482 84 void
797308b2 85 __throw_overflow_error(const char*) __attribute__((__noreturn__));
725dc051 86
e2c09482 87 void
797308b2 88 __throw_underflow_error(const char*) __attribute__((__noreturn__));
725dc051 89
9b3003d5 90 // Helpers for exception objects in <ios>
68a97d24 91 void
9b3003d5 92 __throw_ios_failure(const char*) __attribute__((__noreturn__));
68a97d24
BK
93
94 void
95 __throw_system_error(int) __attribute__((__noreturn__));
96
8d1b99e2
BK
97 void
98 __throw_future_error(int) __attribute__((__noreturn__));
99
ec903a9c
JW
100 // Helpers for exception objects in <functional>
101 void
102 __throw_bad_function_call() __attribute__((__noreturn__));
103
12ffa228
BK
104_GLIBCXX_END_NAMESPACE_VERSION
105} // namespace
d53d7f6e 106
382c6e2d 107#endif