std::error_category::equivalent

virtual bool equivalent( int code,
                         const std::error_condition& condition ) const noexcept;
(1) (C++11 起)
virtual bool equivalent( const std::error_code& code,
                         int condition ) const noexcept;
(2) (C++11 起)

检查对于 *this 所表示的 error_category , error_code 是否等价于 error_condition 。

1) 等价于 default_error_condition(code) == condition
2) 等价于 *this == code.category() && code.value() == condition

参数

code - 指定要比较的 error_code
condition - 指定要比较的 error_condition

返回值

若对于 *this 所表示的 error_category , error_code 等价于给定的 error_condition ,则为 true ,否则为 false

版本历史

  • (当前 | 先前 2017年6月6日 (二) 08:15Fruderica讨论 | 贡献. . (1,012字节) (-785). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 08:02P12bot讨论 | 贡献 . . (1,797字节) (-102). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 15:42P12bot讨论 | 贡献 . . (1,899字节) (+345). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 10:35P12讨论 | 贡献 . . (1,554字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 06:00TranslationBot讨论 | 贡献. . (1,554字节) (-44). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月25日 (四) 13:24P12讨论 | 贡献 . . (1,598字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (1,598字节) (+1,598). . (Translated from the English version using Google Translate)