1// 2// Copyright (c) 2008 Travis Geiselbrecht 3// 4// Use of this source code is governed by a MIT-style 5// license that can be found in the LICENSE file or at 6// https://opensource.org/licenses/MIT 7#pragma once 8 9#include <stddef.h> 10 11// Fake std::nothrow_t without a standard C++ library. 12namespace std { 13 struct nothrow_t {}; 14} // namespace std 15 16void* operator new(size_t, const std::nothrow_t&) noexcept; 17void* operator new[](size_t, const std::nothrow_t&) noexcept; 18 19inline void* operator new(size_t, void *ptr) noexcept { return ptr; } 20inline void* operator new[](size_t, void *ptr) noexcept { return ptr; } 21 22void operator delete(void *p); 23void operator delete[](void *p); 24void operator delete(void *p, size_t); 25void operator delete[](void *p, size_t); 26 27// vim: syntax=cpp 28