7#include <source_location>
21 requires std::constructible_from<std::string_view, T>
22 StringViewSourceLoc(
const T &msg, std::source_location loc = std::source_location::current()) noexcept
29[[noreturn]]
void PanicImpl(
const char *s)
noexcept;
32 const auto msg = fmt::format(
"{}:{} panic: {}\n", s.loc_.file_name(), s.loc_.line(), s.msg_);
38 const auto msg = fmt::format(
"{}:{} panic: {}\n", s.
loc_.file_name(), s.
loc_.line(), s.
msg_);
void Panic(const StringViewSourceLoc &s) noexcept
void AssertOrPanic(const bool condition, const StringViewSourceLoc &s)
void PanicImpl(const char *s) noexcept
A wrapper for std::string_view with a taggable std::source_location.
StringViewSourceLoc(const T &msg, std::source_location loc=std::source_location::current()) noexcept
std::source_location loc_