Added support for completely disabling noexcept using MIJIN_TEST_NO_NOEXCEPT (for testing).

This commit is contained in:
2024-08-29 00:01:23 +02:00
parent a43f92fb58
commit 9ba097fc2f
41 changed files with 643 additions and 564 deletions

View File

@@ -8,6 +8,8 @@
#include <cstdlib>
#include <source_location>
#include "../internal/common.hpp"
#ifdef _WIN32
#pragma comment(lib, "kernel32")
extern "C" __declspec(dllimport) void __stdcall DebugBreak();
@@ -139,7 +141,7 @@ constexpr AssertionResult handleAssert(const char* /* condition */,
#ifdef MIJIN_USE_CUSTOM_ERROR_HANDLER
ErrorHandling handleError(const char* message, const std::source_location& location);
#else
inline ErrorHandling handleError(const char* message, const std::source_location& location) noexcept
inline ErrorHandling handleError(const char* message, const std::source_location& location) MIJIN_NOEXCEPT
{
std::puts(message);
std::printf("Function: %s\n", location.function_name());