emlabcpp
modern opinionated embedded C++ library
throw_bad_alloc.h
Go to the documentation of this file.
1
24
#pragma once
25
26
#include <cstdlib>
27
#include <new>
28
29
namespace
emlabcpp::pmr
30
{
31
32
[[noreturn]]
inline
void
throw_bad_alloc
()
33
{
34
// TODO: this needs customization point /o\...
35
#ifdef __EXCEPTIONS
36
throw
std::bad_alloc{};
37
#else
38
std::abort();
39
#endif
40
}
41
42
}
// namespace emlabcpp::pmr
emlabcpp::pmr
MIT License.
Definition:
aliases.h:36
emlabcpp::pmr::throw_bad_alloc
void throw_bad_alloc()
Definition:
throw_bad_alloc.h:32
include
emlabcpp
pmr
throw_bad_alloc.h
Generated on Sun Jul 27 2025 20:01:11 for emlabcpp by
1.9.1