mirror of
https://github.com/ziglang/zig.git
synced 2025-12-21 05:33:15 +00:00
release/17.x branch, commit 8f4dd44097c9ae25dd203d5ac87f3b48f854bba8 This adds the flag `-D_LIBCPP_PSTL_CPU_BACKEND_SERIAL`. A future enhancement could possibly pass something different if there is a compelling parallel implementation. That libdispatch one might be worth looking into.
31 lines
687 B
C++
Vendored
31 lines
687 B
C++
Vendored
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include <cstdlib>
|
|
#include <new>
|
|
|
|
namespace std { // purposefully not versioned
|
|
|
|
#ifndef __GLIBCXX__
|
|
const nothrow_t nothrow{};
|
|
#endif
|
|
|
|
#ifndef LIBSTDCXX
|
|
|
|
void __throw_bad_alloc() {
|
|
# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
|
|
throw bad_alloc();
|
|
# else
|
|
std::abort();
|
|
# endif
|
|
}
|
|
|
|
#endif // !LIBSTDCXX
|
|
|
|
} // namespace std
|