36 std::string_view reason = {},
37 std::optional<std::source_location> location = KAYCXX_ASSERT_DEFAULT_SOURCE
39 if (!(actual ==
nullptr)) {
40 auto actual_string = detail::to_string(actual);
41 auto message = std::format(
"Expected <{}> to be null", actual_string);
42 throw assertion_error(
45 std::move(actual_string),
void assert_null(T const &actual, std::string_view reason={}, std::optional< std::source_location > location=KAYCXX_ASSERT_DEFAULT_SOURCE)
Asserts that the argument is null.
Definition assert_null.hpp:34