1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10module; 11#include <new> 12 13export module std:__new; // Note new is a keyword and not a valid identifier 14export namespace std { 15 // [alloc.errors], storage allocation errors 16 using std::bad_alloc; 17 using std::bad_array_new_length; 18 19 using std::destroying_delete; 20 using std::destroying_delete_t; 21 22 // global operator new control 23 using std::align_val_t; 24 25 using std::nothrow; 26 using std::nothrow_t; 27 28 using std::get_new_handler; 29 using std::new_handler; 30 using std::set_new_handler; 31 32 // [ptr.launder], pointer optimization barrier 33 using std::launder; 34#if 0 35 // [hardware.interference], hardware interference size 36 using std::hardware_constructive_interference_size; 37 using std::hardware_destructive_interference_size; 38#endif 39} // namespace std 40 41export { 42 using ::operator new; 43 using ::operator delete; 44 using ::operator new[]; 45 using ::operator delete[]; 46} // export 47