1/* 2 * Copyright 2022 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/** 8 * @file 9 * 10 * @brief Stub header allowing compilation of `#include <new>` 11 */ 12 13#ifndef ZEPHYR_SUBSYS_CPP_INCLUDE_NEW_ 14#define ZEPHYR_SUBSYS_CPP_INCLUDE_NEW_ 15 16#include <cstddef> 17 18namespace std { 19#if __cplusplus < 201103L 20 struct nothrow_t {}; 21#else 22 struct nothrow_t { 23 explicit nothrow_t() = default; 24 }; 25#endif /* __cplusplus */ 26 extern const std::nothrow_t nothrow; 27 28#if __cplusplus >= 201703L 29 enum class align_val_t : std::size_t {}; 30#endif /* CONFIG_STD_CPP17 */ 31 32} 33#endif /* ZEPHYR_SUBSYS_CPP_INCLUDE_NEW_ */ 34