blob: 2cff8ee2f083a1e150f2a7aa148ce7836e9ea7fd [file] [log] [blame]
Howard Hinnant3e7d1552012-02-17 19:23:471//===------------------------ stdexcept.cpp -------------------------------===//
2//
Chandler Carruth57b08b02019-01-19 10:56:403// 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
Howard Hinnant3e7d1552012-02-17 19:23:476//
7//===----------------------------------------------------------------------===//
8
Eric Fiselier84800d92017-07-12 01:34:219#include "include/refstring.h"
Howard Hinnant3e7d1552012-02-17 19:23:4710#include "stdexcept"
11#include "new"
12#include <cstdlib>
13#include <cstring>
14#include <cstdint>
15#include <cstddef>
16
Marshall Clow1f6f59a2014-05-07 20:17:4117static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
Howard Hinnant3e7d1552012-02-17 19:23:4718
19namespace std // purposefully not using versioning namespace
20{
21
Marshall Clow1f6f59a2014-05-07 20:17:4122logic_error::~logic_error() _NOEXCEPT {}
Howard Hinnant3e7d1552012-02-17 19:23:4723
24const char*
25logic_error::what() const _NOEXCEPT
26{
Marshall Clow1f6f59a2014-05-07 20:17:4127 return __imp_.c_str();
Howard Hinnant3e7d1552012-02-17 19:23:4728}
29
Marshall Clow1f6f59a2014-05-07 20:17:4130runtime_error::~runtime_error() _NOEXCEPT {}
Howard Hinnant3e7d1552012-02-17 19:23:4731
32const char*
33runtime_error::what() const _NOEXCEPT
34{
Marshall Clow1f6f59a2014-05-07 20:17:4135 return __imp_.c_str();
Howard Hinnant3e7d1552012-02-17 19:23:4736}
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