llvm-project
30 строк · 752.0 Байт
1//===----------------------------------------------------------------------===//
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 <__verbose_abort>10#include <new>11
12namespace std { // purposefully not versioned13
14#ifndef __GLIBCXX__15const nothrow_t nothrow{};16#endif17
18#ifndef LIBSTDCXX19
20void __throw_bad_alloc() {21# ifndef _LIBCPP_HAS_NO_EXCEPTIONS22throw bad_alloc();23# else24_LIBCPP_VERBOSE_ABORT("bad_alloc was thrown in -fno-exceptions mode");25# endif26}
27
28#endif // !LIBSTDCXX29
30} // namespace std31