3#if (__cpp_lib_unreachable >= 202202L)
7#include <SDL3/SDL_log.h>
8#include <SDL3/SDL_assert.h>
13#include <source_location>
18#if (__cpp_lib_unreachable >= 202202L)
20#elif defined(_MSC_VER)
23 __builtin_unreachable();
31 std::source_location::current());
37 std::string_view fmtstr,
38 std::format_args args);
40 template <
typename... Ts>
42 std::string_view _fmtstr, Ts &&...args) {
44 std::make_format_args(args...));
49template <
typename... Ts>
54 location.function_name(), fmt, std::forward<Ts>(args)...));
57template <
typename... Ts>
61 std::forward<Ts>(args)...);
67 std::source_location location = std::source_location::current()) {
69 SDL_LOG_CATEGORY_APPLICATION,
"%s",
std::string error_message_format(std::string_view fname, std::string_view _fmtstr, Ts &&...args)
Definition errors.h:41
std::string _error_message_impl(std::string_view fname, std::string_view fmtstr, std::format_args args)
void terminate_with_message(std::source_location location, std::string_view fmt, Ts &&...args)
Definition errors.h:51
void unreachable()
Definition errors.h:17
void unreachable_with_message(std::string_view msg, std::source_location location=std::source_location::current())
Definition errors.h:65
RAIIException(std::string_view msg, std::source_location location=std::source_location::current())