A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/syserr.errcondition below:

[syserr.errcondition]

22 Diagnostics library [diagnostics] 22.5 System error support [syserr] 22.5.4 Class error_­condition [syserr.errcondition] 22.5.4.1 Class error_­condition overview [syserr.errcondition.overview]

The class error_­condition describes an object used to hold values identifying error conditions. [Note: error_­condition values are portable abstractions, while error_­code values are implementation specific. end note]

namespace std {
  class error_condition {
  public:
        error_condition() noexcept;
    error_condition(int val, const error_category& cat) noexcept;
    template <class ErrorConditionEnum>
      error_condition(ErrorConditionEnum e) noexcept;

        void assign(int val, const error_category& cat) noexcept;
    template <class ErrorConditionEnum>
      error_condition& operator=(ErrorConditionEnum e) noexcept;
    void clear() noexcept;

        int value() const noexcept;
    const error_category& category() const noexcept;
    string message() const;
    explicit operator bool() const noexcept;

  private:
    int val_;                       const error_category* cat_;   };
}
22.5.4.2 Class error_­condition constructors [syserr.errcondition.constructors]

error_condition() noexcept;

Effects: Constructs an object of type error_­condition.

Postconditions: val_­ == 0 and cat_­ == &generic_­category().

error_condition(int val, const error_category& cat) noexcept;

Effects: Constructs an object of type error_­condition.

Postconditions: val_­ == val and cat_­ == &cat.

template <class ErrorConditionEnum> error_condition(ErrorConditionEnum e) noexcept;

Effects: Constructs an object of type error_­condition.

Postconditions: *this == make_­error_­condition(e).

Remarks: This constructor shall not participate in overload resolution unless
is_­error_­condition_­enum_­v<ErrorConditionEnum> is true.

22.5.4.3 Class error_­condition modifiers [syserr.errcondition.modifiers]

void assign(int val, const error_category& cat) noexcept;

Postconditions: val_­ == val and cat_­ == &cat.

template <class ErrorConditionEnum> error_condition& operator=(ErrorConditionEnum e) noexcept;

Postconditions: *this == make_­error_­condition(e).

Remarks: This operator shall not participate in overload resolution unless
is_­error_­condition_­enum_­v<ErrorConditionEnum> is true.

void clear() noexcept;

Postconditions: value() == 0 and category() == generic_­category().

22.5.4.4 Class error_­condition observers [syserr.errcondition.observers]

int value() const noexcept;

const error_category& category() const noexcept;

string message() const;

Returns: category().message(value()).

explicit operator bool() const noexcept;

22.5.4.5 Class error_­condition non-member functions [syserr.errcondition.nonmembers]

error_condition make_error_condition(errc e) noexcept;

Returns: error_­condition(static_­cast<int>(e), generic_­category()).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4