C++ åèæå
- C++11
- C++14
- C++17
- C++20
- C++ ç¼è¯å¨æ¯ææ åµè¡¨
- ç¬ç«ä¸å®¿ä¸»å®ç°
- C++ è¯è¨
- C++ å ³é®è¯
- é¢å¤çå¨
- C++ æ ååºå¤´æä»¶
- å ·åè¦æ±
- åè½ç¹æ§æµè¯ (C++20)
- å·¥å ·åº
- ç±»åæ¯æï¼åºæ¬ç±»åãRTTIãç±»åç¹æ§ï¼
- æ¦å¿µåº (C++20)
- é误å¤ç
- std::exception_ptr
- std::error_code
- std::hash<std::error_code>
- std::is_error_code_enum
- std::error_code::error_code
- std::error_code::operator=
- std::error_code::assign
- std::error_code::clear
- std::error_code::value
- std::error_code::category
- std::error_code::default_error_condition
- std::error_code::message
- std::error_code::operator bool
- std::operator==,!=,<,<=>(std::error_code)
- std::operator<<(std::error_code)
- std::error_condition
- std::terminate
- std::exception
- std::current_exception
- std::rethrow_exception
- std::make_exception_ptr
- std::unexpected
- std::uncaught_exception, std::uncaught_exceptions
- assert
- errno
- std::nested_exception
- std::throw_with_nested
- std::rethrow_if_nested
- std::terminate_handler
- std::get_terminate
- std::set_terminate
- std::bad_exception
- std::unexpected_handler
- std::get_unexpected
- std::set_unexpected
- é误å·
- std::logic_error
- std::invalid_argument
- std::domain_error
- std::length_error
- std::out_of_range
- std::runtime_error
- std::range_error
- std::overflow_error
- std::underflow_error
- std::tx_exception
- std::error_category
- std::generic_category
- std::system_category
- std::errc
- std::system_error
- 注é
- 卿å å管ç
- æ¥æåæ¶é´å·¥å ·
- å符串åº
- 容å¨åº
- è¿ä»£å¨åº
- èå´åº (C++20)
- ç®æ³åº
- æ°å¼åº
- è¾å ¥/è¾åºåº
- æä»¶ç³»ç»åº
- æ¬å°ååº
- æ£å表达å¼åº
- ååæä½åº
- çº¿ç¨æ¯æåº
- å®éªæ§ C++ ç¹æ§
- æç¨çèµæº
- ç´¢å¼
- std 符å·ç´¢å¼
- åç¨æ¯æ (C++20)
- C++ å ³é®è¯
ä½ç½®ï¼é¦é¡µ > C++ åèæå >é误å¤ç >std::error_code > std::is_error_code_enum
std::is_error_code_enum
| å®ä¹äºå¤´æä»¶ <system_error>
|
||
| template< class T > struct is_error_code_enum; |
(C++11 èµ·) | |
è¥ T æ¯éè¯¯ç æä¸¾ï¼åæ¤æ¨¡æ¿æä¾çäº true çæå常é value ã对äºä»»ä½å
¶ä»ç±»åï¼ value 为 false ã
æ¤æ¨¡æ¿å¯ä»¥ä¸ºç¨æ·å®ä¹ç±»åç¹åï¼ä»¥æç¤ºè¯¥ç±»åéåäº std::error_code å std::error_condition èªå¨è½¬æ¢ã
æ ååºçä¸åç±»æ¯éè¯¯ç æä¸¾ï¼
帮å©å鿍¡æ¿
| template< class T > inline constexpr bool is_error_code_enum_v = is_error_code_enum<T>::value; |
(C++17 èµ·) | |
ç»§æ¿èª std::integral_constant
æå常é
| value [éæ] |
è¥ T æ¯éè¯¯ç æä¸¾å为 true ï¼å¦å为 false (å ¬å¼éææå常é) |
æå彿°
| operator bool |
转æ¢å¯¹è±¡ä¸º bool ï¼è¿å value (å ¬å¼æå彿°) |
| operator() (C++14) |
è¿å value (å ¬å¼æå彿°) |
æåç±»å
| Â | |
| ç±»å | å®ä¹ |
value_type
|
bool
|
type
|
std::integral_constant<bool, value> |
åé
| (C++11) |
é´å«æä¸¾æ¯å¦å¯ä½ä¸º std::error_condition (类模æ¿) |