29 #ifndef _STDEXCEPT_EXCEPT_H
30 #define _STDEXCEPT_EXCEPT_H 1
35 namespace 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
337 [[__gnu__::__gnu_inline__]]
340 explicit domain_error(
const string& __arg) _GLIBCXX_TXN_SAFE;
341 #if __cplusplus >= 201103L
356 #if __cpp_lib_constexpr_exceptions >= 202502L
357 [[__gnu__::__gnu_inline__]]
361 [[__gnu__::__gnu_inline__]]
369 [[__gnu__::__gnu_inline__]]
373 #if __cplusplus >= 201103L
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
401 [[__gnu__::__gnu_inline__]]
404 explicit length_error(
const string& __arg) _GLIBCXX_TXN_SAFE;
405 #if __cplusplus >= 201103L
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
433 [[__gnu__::__gnu_inline__]]
436 explicit out_of_range(
const string& __arg) _GLIBCXX_TXN_SAFE;
437 #if __cplusplus >= 201103L
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
505 virtual ~
runtime_error() _GLIBCXX_TXN_SAFE_DYN _GLIBCXX_NOTHROW;
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__]]
528 [[__gnu__::__gnu_inline__]]
536 [[__gnu__::__gnu_inline__]]
540 #if __cplusplus >= 201103L
555 #if __cpp_lib_constexpr_exceptions >= 202502L
556 [[__gnu__::__gnu_inline__]]
560 [[__gnu__::__gnu_inline__]]
568 [[__gnu__::__gnu_inline__]]
572 #if __cplusplus >= 201103L
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.
Base class for all library exceptions.
One of two subclasses of exception.
logic_error(const string &__arg) _GLIBCXX_TXN_SAFE
One of two subclasses of exception.
runtime_error(const string &__arg) _GLIBCXX_TXN_SAFE