1 //===------------------------ stdexcept.cpp -------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #include "__refstring" 11 #include "stdexcept" 12 #include "new" 13 #include <cstdlib> 14 #include <cstring> 15 #include <cstdint> 16 #include <cstddef> 17 18 static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), ""); 19 20 namespace std // purposefully not using versioning namespace 21 { 22 ~logic_error()23logic_error::~logic_error() _NOEXCEPT {} 24 25 const char* what() const26logic_error::what() const _NOEXCEPT 27 { 28 return __imp_.c_str(); 29 } 30 ~runtime_error()31runtime_error::~runtime_error() _NOEXCEPT {} 32 33 const char* what() const34runtime_error::what() const _NOEXCEPT 35 { 36 return __imp_.c_str(); 37 } 38 ~domain_error()39domain_error::~domain_error() _NOEXCEPT {} ~invalid_argument()40invalid_argument::~invalid_argument() _NOEXCEPT {} ~length_error()41length_error::~length_error() _NOEXCEPT {} ~out_of_range()42out_of_range::~out_of_range() _NOEXCEPT {} 43 ~range_error()44range_error::~range_error() _NOEXCEPT {} ~overflow_error()45overflow_error::~overflow_error() _NOEXCEPT {} ~underflow_error()46underflow_error::~underflow_error() _NOEXCEPT {} 47 48 } // std 49