Skip to content
Welcome to the new CppUtils documentation!

Matcher for validating that a callable throws an expected exception type with optional message or predicate.

std::string_view expectedMessage {};
constexpr ThrowsMatcher::ThrowsMatcher() = default;
constexpr explicit ThrowsMatcher::ThrowsMatcher(std::string_view message) noexcept;
[[nodiscard]] constexpr auto ThrowsMatcher::operator()(std::string_view message) const noexcept -> ThrowsMatcher;
template <class PredicateOrValue>
[[nodiscard]] constexpr auto ThrowsMatcher::operator()(PredicateOrValue&& predicateOrValue) const;