4#ifndef WPI_MEMORY_DETAIL_ASSERT_HPP_INCLUDED
5#define WPI_MEMORY_DETAIL_ASSERT_HPP_INCLUDED
19 const char* fnc)
noexcept;
22 const char* fnc)
noexcept;
27#if WPI_MEMORY_DEBUG_ASSERT && !defined(WPI_MEMORY_ASSERT)
28#define WPI_MEMORY_ASSERT(Expr) \
29 static_cast<void>((Expr) \
30 || (detail::handle_failed_assert("Assertion \"" #Expr "\" failed", __FILE__, \
31 __LINE__, __func__), \
34#define WPI_MEMORY_ASSERT_MSG(Expr, Msg) \
35 static_cast<void>((Expr) \
36 || (detail::handle_failed_assert("Assertion \"" #Expr "\" failed: " Msg, \
37 __FILE__, __LINE__, __func__), \
40#define WPI_MEMORY_UNREACHABLE(Msg) \
41 detail::handle_failed_assert("Unreachable code reached: " Msg, __FILE__, __LINE__, __func__)
43#define WPI_MEMORY_WARNING(Msg) detail::handle_warning(Msg, __FILE__, __LINE__, __func__)
45#elif !defined(WPI_MEMORY_ASSERT)
46#define WPI_MEMORY_ASSERT(Expr)
47#define WPI_MEMORY_ASSERT_MSG(Expr, Msg)
48#define WPI_MEMORY_UNREACHABLE(Msg) std::abort()
49#define WPI_MEMORY_WARNING(Msg)
detail namespace with internal helper functions
Definition input_adapters.h:32
void handle_warning(const char *msg, const char *file, int line, const char *fnc) noexcept
void handle_failed_assert(const char *msg, const char *file, int line, const char *fnc) noexcept
Memory namespace.
Definition heap_allocator.hpp:20
Foonathan namespace.
Definition ntcore_cpp.h:26