12#include <source_location>
37 std::string
const& message,
41 std::optional<std::source_location>
location = std::nullopt
49 std::string
const&
reason() const noexcept;
56 std::
string const&
actual() const noexcept;
70 std::optional<std::source_location> const&
location() const noexcept;
75 std::
string expected_;
76 std::optional<std::source_location> location_;
Thrown when an assertion fails.
Definition assertion_error.hpp:22
std::string const & expected() const noexcept
Returns the rendered expected value.
std::string const & actual() const noexcept
Returns the rendered actual value.
assertion_error(std::string const &message, std::string_view reason, std::string actual, std::string expected, std::optional< std::source_location > location=std::nullopt)
Creates an assertion error with already-rendered diagnostic values.
std::optional< std::source_location > const & location() const noexcept
Returns the source location of the failed assertion.
std::string const & reason() const noexcept
Returns the optional assertion reason.
Assertion functions and related types.
Definition assert.hpp:15