1//===------------------------ stdexcept.cpp -------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "include/refstring.h"
10#include "stdexcept"
11#include "new"
12#include <cstdlib>
13#include <cstring>
14#include <cstdint>
15#include <cstddef>
16
17static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
18
19namespace std // purposefully not using versioning namespace
20{
21
22logic_error::~logic_error() _NOEXCEPT {}
23
24const char*
25logic_error::what() const _NOEXCEPT
26{
27 return __imp_.c_str();
28}
29
30runtime_error::~runtime_error() _NOEXCEPT {}
31
32const char*
33runtime_error::what() const _NOEXCEPT
34{
35 return __imp_.c_str();
36}
37
38domain_error::~domain_error() _NOEXCEPT {}
39invalid_argument::~invalid_argument() _NOEXCEPT {}
40length_error::~length_error() _NOEXCEPT {}
41out_of_range::~out_of_range() _NOEXCEPT {}
42
43range_error::~range_error() _NOEXCEPT {}
44overflow_error::~overflow_error() _NOEXCEPT {}
45underflow_error::~underflow_error() _NOEXCEPT {}
46
47} // std
48