# Standard library header <contract>

From cppreference.com
< cpp‎ | header

This header is part of the error handling library.

### Classes
contract_violation (C++20) | provides information about contract violation generated by an implementation (class)

### Synopsis

    namespace std {
      class contract_violation;
    }

#### Class std::contract_violation

    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;
    };

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/header/contract&oldid=105663"