29#ifndef _STDEXCEPT_EXCEPT_H
30#define _STDEXCEPT_EXCEPT_H 1
35namespace std _GLIBCXX_VISIBILITY(default)
37_GLIBCXX_BEGIN_NAMESPACE_VERSION
39#if _GLIBCXX_USE_DUAL_ABI
40#if _GLIBCXX_USE_CXX11_ABI
41#if __cpp_lib_constexpr_exceptions >= 202502L
42 struct __cow_constexpr_string;
47 void _ZNSt12__cow_stringC2EPKcm(__cow_constexpr_string*,
const char*,
49 void _ZNSt12__cow_stringC2EPKcj(__cow_constexpr_string*,
const char*,
51 void _ZNSt12__cow_stringC2EPKcy(__cow_constexpr_string*,
const char*,
53 void _ZNSt12__cow_stringC2EPKc(__cow_constexpr_string*,
const char*);
54 void _ZNSt12__cow_stringC2ERKS_(__cow_constexpr_string*,
55 const __cow_constexpr_string&)
noexcept;
56 void _ZNSt12__cow_stringC2EOS_(__cow_constexpr_string*,
57 __cow_constexpr_string&&) noexcept;
58 void _ZNSt12__cow_stringD2Ev(__cow_constexpr_string*);
59 __cow_constexpr_string&
60 _ZNSt12__cow_stringaSERKS_(__cow_constexpr_string*,
61 const __cow_constexpr_string&) noexcept;
62 __cow_constexpr_string&
63 _ZNSt12__cow_stringaSEOS_(__cow_constexpr_string*,
64 __cow_constexpr_string&&) noexcept;
66 _ZNKSt12__cow_string5c_strEv(const __cow_constexpr_string*) noexcept;
73 struct __cow_constexpr_string
77 char _M_bytes[
sizeof(
const char*)];
81 [[__gnu__::__always_inline__]]
constexpr
82 __cow_constexpr_string(
const string& __o)
87 __cow_constexpr_string_ctor(__o.c_str(), __o.length());
91 [[__gnu__::__always_inline__]]
inline void
92 __cow_constexpr_string_ctor(
const char *__s,
unsigned long __l)
94 __detail::_ZNSt12__cow_stringC2EPKcm(
this, __s, __l);
97 [[__gnu__::__always_inline__]]
inline void
98 __cow_constexpr_string_ctor(
const char *__s,
unsigned int __l)
100 __detail::_ZNSt12__cow_stringC2EPKcj(
this, __s, __l);
103 [[__gnu__::__always_inline__]]
inline void
104 __cow_constexpr_string_ctor(
const char *__s,
unsigned long long __l)
106 __detail::_ZNSt12__cow_stringC2EPKcy(
this, __s, __l);
109 [[__gnu__::__always_inline__]]
constexpr
110 __cow_constexpr_string(
const char* __o)
115 __detail::_ZNSt12__cow_stringC2EPKc(
this, __o);
119 [[__gnu__::__always_inline__]]
constexpr
120 __cow_constexpr_string(
const __cow_constexpr_string& __o)
noexcept
123 _M_str =
new string(*__o._M_str);
125 __detail::_ZNSt12__cow_stringC2ERKS_(
this, __o);
129 [[__gnu__::__always_inline__]]
constexpr __cow_constexpr_string&
130 operator=(
const __cow_constexpr_string& __o)
noexcept
133 string* __p = _M_str;
134 _M_str =
new string(*__o._M_str);
138 return __detail::_ZNSt12__cow_stringaSERKS_(
this, __o);
142 [[__gnu__::__always_inline__]]
constexpr
143 ~__cow_constexpr_string()
148 __detail::_ZNSt12__cow_stringD2Ev(
this);
152 [[__gnu__::__always_inline__]]
constexpr
153 __cow_constexpr_string(__cow_constexpr_string&& __o)
noexcept
158 __detail::_ZNSt12__cow_stringC2EOS_(
this,
std::move(__o));
162 [[__gnu__::__always_inline__]]
constexpr __cow_constexpr_string&
163 operator=(__cow_constexpr_string&& __o)
noexcept
166 string* __p = _M_str;
171 return __detail::_ZNSt12__cow_stringaSEOS_(
this,
std::move(__o));
175 [[__gnu__::__always_inline__]]
constexpr const char*
176 c_str() const noexcept
179 return _M_str->c_str();
181 return __detail::_ZNKSt12__cow_string5c_strEv(
this);
186 typedef __cow_constexpr_string __cow_string;
193 char _M_bytes[
sizeof(
const char*)];
198 __cow_string(
const char*,
size_t);
199 __cow_string(
const __cow_string&) _GLIBCXX_NOTHROW;
200 __cow_string& operator=(
const __cow_string&) _GLIBCXX_NOTHROW;
202#if __cplusplus >= 201103L
203 __cow_string(__cow_string&&) noexcept;
204 __cow_string& operator=(__cow_string&&) noexcept;
209 typedef basic_string<char> __sso_string;
211 typedef basic_string<char> __cow_string;
219 size_t _M_string_length;
220 char _M_local_buf[16];
225 char _M_bytes[
sizeof(__str)];
228 __sso_string() _GLIBCXX_NOTHROW;
229 __sso_string(const std::
string&);
230 __sso_string(const
char*,
size_t);
231 __sso_string(const __sso_string&);
232 __sso_string& operator=(const __sso_string&);
234#if __cplusplus >= 201103L
235 __sso_string(__sso_string&&) noexcept;
236 __sso_string& operator=(__sso_string&&) noexcept;
241 typedef basic_string<char> __sso_string;
242 typedef basic_string<char> __cow_string;
260#if __cpp_lib_constexpr_exceptions >= 202502L
261 [[__gnu__::__gnu_inline__]]
262 constexpr inline explicit
266 [[__gnu__::__gnu_inline__]]
267 constexpr inline explicit
276 [[__gnu__::__gnu_inline__]]
277 constexpr inline virtual ~logic_error() _GLIBCXX_TXN_SAFE_DYN
noexcept { }
279 [[__gnu__::__gnu_inline__]]
280 constexpr inline virtual const char*
281 what()
const _GLIBCXX_TXN_SAFE_DYN
noexcept
283 return _M_msg.c_str();
290#if __cplusplus >= 201103L
298#if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS
301#elif __cplusplus >= 201103L
306 virtual ~logic_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
311 what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
314# ifdef _GLIBCXX_TM_TS_INTERNAL
316 ::_txnal_logic_error_get_msg(
void* e);
325#if __cpp_lib_constexpr_exceptions >= 202502L
326 [[__gnu__::__gnu_inline__]]
327 constexpr inline explicit domain_error(
const string& __arg)
330 [[__gnu__::__gnu_inline__]]
331 constexpr inline explicit domain_error(
const char* __arg) _GLIBCXX_TXN_SAFE
333 constexpr domain_error(
const domain_error&) =
default;
334 constexpr domain_error& operator=(
const domain_error&) =
default;
335 constexpr domain_error(domain_error&&) =
default;
336 constexpr domain_error& operator=(domain_error&&) =
default;
337 [[__gnu__::__gnu_inline__]]
338 constexpr inline virtual ~domain_error()
noexcept { }
340 explicit domain_error(
const string& __arg) _GLIBCXX_TXN_SAFE;
341#if __cplusplus >= 201103L
342 explicit domain_error(
const char*) _GLIBCXX_TXN_SAFE;
343 domain_error(
const domain_error&) =
default;
344 domain_error& operator=(
const domain_error&) =
default;
345 domain_error(domain_error&&) =
default;
346 domain_error& operator=(domain_error&&) =
default;
348 virtual ~domain_error() _GLIBCXX_NOTHROW;
356#if __cpp_lib_constexpr_exceptions >= 202502L
357 [[__gnu__::__gnu_inline__]]
358 constexpr inline explicit invalid_argument(
const string& __arg)
361 [[__gnu__::__gnu_inline__]]
362 constexpr inline explicit invalid_argument(
const char* __arg)
365 constexpr invalid_argument(
const invalid_argument&) =
default;
366 constexpr invalid_argument& operator=(
const invalid_argument&) =
default;
367 constexpr invalid_argument(invalid_argument&&) =
default;
368 constexpr invalid_argument& operator=(invalid_argument&&) =
default;
369 [[__gnu__::__gnu_inline__]]
370 constexpr inline virtual ~invalid_argument()
noexcept { }
372 explicit invalid_argument(
const string& __arg) _GLIBCXX_TXN_SAFE;
373#if __cplusplus >= 201103L
374 explicit invalid_argument(
const char*) _GLIBCXX_TXN_SAFE;
375 invalid_argument(
const invalid_argument&) =
default;
376 invalid_argument& operator=(
const invalid_argument&) =
default;
377 invalid_argument(invalid_argument&&) =
default;
378 invalid_argument& operator=(invalid_argument&&) =
default;
380 virtual ~invalid_argument() _GLIBCXX_NOTHROW;
389#if __cpp_lib_constexpr_exceptions >= 202502L
390 [[__gnu__::__gnu_inline__]]
391 constexpr inline explicit length_error(
const string& __arg)
394 [[__gnu__::__gnu_inline__]]
395 constexpr inline explicit length_error(
const char* __arg) _GLIBCXX_TXN_SAFE
397 constexpr length_error(
const length_error&) =
default;
398 constexpr length_error& operator=(
const length_error&) =
default;
399 constexpr length_error(length_error&&) =
default;
400 constexpr length_error& operator=(length_error&&) =
default;
401 [[__gnu__::__gnu_inline__]]
402 constexpr inline virtual ~length_error()
noexcept { }
404 explicit length_error(
const string& __arg) _GLIBCXX_TXN_SAFE;
405#if __cplusplus >= 201103L
406 explicit length_error(
const char*) _GLIBCXX_TXN_SAFE;
407 length_error(
const length_error&) =
default;
408 length_error& operator=(
const length_error&) =
default;
409 length_error(length_error&&) =
default;
410 length_error& operator=(length_error&&) =
default;
412 virtual ~length_error() _GLIBCXX_NOTHROW;
421#if __cpp_lib_constexpr_exceptions >= 202502L
422 [[__gnu__::__gnu_inline__]]
423 constexpr inline explicit out_of_range(
const string& __arg)
426 [[__gnu__::__gnu_inline__]]
427 constexpr inline explicit out_of_range(
const char* __arg) _GLIBCXX_TXN_SAFE
429 constexpr out_of_range(
const out_of_range&) =
default;
430 constexpr out_of_range& operator=(
const out_of_range&) =
default;
431 constexpr out_of_range(out_of_range&&) =
default;
432 constexpr out_of_range& operator=(out_of_range&&) =
default;
433 [[__gnu__::__gnu_inline__]]
434 constexpr inline virtual ~out_of_range()
noexcept { }
436 explicit out_of_range(
const string& __arg) _GLIBCXX_TXN_SAFE;
437#if __cplusplus >= 201103L
438 explicit out_of_range(
const char*) _GLIBCXX_TXN_SAFE;
439 out_of_range(
const out_of_range&) =
default;
440 out_of_range& operator=(
const out_of_range&) =
default;
441 out_of_range(out_of_range&&) =
default;
442 out_of_range& operator=(out_of_range&&) =
default;
444 virtual ~out_of_range() _GLIBCXX_NOTHROW;
458#if __cpp_lib_constexpr_exceptions >= 202502L
459 [[__gnu__::__gnu_inline__]]
460 constexpr inline explicit
464 [[__gnu__::__gnu_inline__]]
465 constexpr inline explicit
474 [[__gnu__::__gnu_inline__]]
475 constexpr inline virtual ~runtime_error() _GLIBCXX_TXN_SAFE_DYN
noexcept
478 [[__gnu__::__gnu_inline__]]
479 constexpr inline virtual const char*
480 what()
const _GLIBCXX_TXN_SAFE_DYN
noexcept
482 return _M_msg.c_str();
489#if __cplusplus >= 201103L
497#if _GLIBCXX_USE_CXX11_ABI || _GLIBCXX_DEFINE_STDEXCEPT_COPY_OPS
500#elif __cplusplus >= 201103L
510 what() const _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
513# ifdef _GLIBCXX_TM_TS_INTERNAL
515 ::_txnal_runtime_error_get_msg(
void* e);
523#if __cpp_lib_constexpr_exceptions >= 202502L
524 [[__gnu__::__gnu_inline__]]
525 constexpr inline explicit overflow_error(
const string& __arg)
528 [[__gnu__::__gnu_inline__]]
529 constexpr inline explicit overflow_error(
const char* __arg)
532 constexpr overflow_error(
const overflow_error&) =
default;
533 constexpr overflow_error& operator=(
const overflow_error&) =
default;
534 constexpr overflow_error(overflow_error&&) =
default;
535 constexpr overflow_error& operator=(overflow_error&&) =
default;
536 [[__gnu__::__gnu_inline__]]
537 constexpr inline virtual ~overflow_error()
noexcept { }
539 explicit overflow_error(
const string& __arg) _GLIBCXX_TXN_SAFE;
540#if __cplusplus >= 201103L
541 explicit overflow_error(
const char*) _GLIBCXX_TXN_SAFE;
542 overflow_error(
const overflow_error&) =
default;
543 overflow_error& operator=(
const overflow_error&) =
default;
544 overflow_error(overflow_error&&) =
default;
545 overflow_error& operator=(overflow_error&&) =
default;
547 virtual ~overflow_error() _GLIBCXX_NOTHROW;
555#if __cpp_lib_constexpr_exceptions >= 202502L
556 [[__gnu__::__gnu_inline__]]
557 constexpr inline explicit underflow_error(
const string& __arg)
560 [[__gnu__::__gnu_inline__]]
561 constexpr inline explicit underflow_error(
const char* __arg)
564 constexpr underflow_error(
const underflow_error&) =
default;
565 constexpr underflow_error& operator=(
const underflow_error&) =
default;
566 constexpr underflow_error(underflow_error&&) =
default;
567 constexpr underflow_error& operator=(underflow_error&&) =
default;
568 [[__gnu__::__gnu_inline__]]
569 constexpr inline virtual ~underflow_error()
noexcept { }
571 explicit underflow_error(
const string& __arg) _GLIBCXX_TXN_SAFE;
572#if __cplusplus >= 201103L
573 explicit underflow_error(
const char*) _GLIBCXX_TXN_SAFE;
574 underflow_error(
const underflow_error&) =
default;
575 underflow_error& operator=(
const underflow_error&) =
default;
576 underflow_error(underflow_error&&) =
default;
577 underflow_error& operator=(underflow_error&&) =
default;
579 virtual ~underflow_error() _GLIBCXX_NOTHROW;
585_GLIBCXX_END_NAMESPACE_VERSION
constexpr std::remove_reference< _Tp >::type && move(_Tp &&__t) noexcept
Convert a value to an rvalue.
basic_string< char > string
A string of char.
ISO C++ entities toplevel namespace is std.
Implementation details not part of the namespace std interface.
virtual const char * what() const noexcept
logic_error(const string &__arg)
runtime_error(const string &__arg)
virtual const char * what() const noexcept