namespace std {
class contract_violation {
public:
uint_least32_t line_number() const noexcept;
string_view file_name() const noexcept;
string_view function_name() const noexcept;
string_view comment() const noexcept;
string_view assertion_level() const noexcept;
};
}
The class
contract_violation describes information about
a contract violation generated by the implementation
. uint_least32_t line_number() const noexcept;
If the location is unknown, an implementation may return
0. string_view file_name() const noexcept;
If the file name is unknown,
an implementation may return
string_view{}. string_view function_name() const noexcept;
If the function name is unknown,
an implementation may return
string_view{}. string_view comment() const noexcept;
Returns: Implementation-defined text describing
the predicate of the violated contract
. string_view assertion_level() const noexcept;
Returns: Text describing the
assertion-level
of the violated contract
.