最終更新日時(UTC):
が更新

履歴 編集

function
<system_error>

std::error_condition::category(C++11)

const error_category& category() const noexcept;

概要

包含しているエラーカテゴリへの参照を返す

戻り値

包含しているエラーカテゴリへの参照

例外

投げない

#include <iostream>
#include <system_error>

int main()
{
  std::error_condition ec(static_cast<int>(std::errc::invalid_argument),
                          std::generic_category());

  const std::error_category& cat = ec.category();
  std::cout << cat.name() << std::endl;
}

出力

generic

バージョン

言語

  • C++11

処理系

参照