GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing cplusplus.com — std::error_category Reference
<system_error>
error_category
abstract class
<system_error>
std::error_categoryclass error_category; Error category
Category types are used to identify the source of an error. They also define the relation between error_code and error_condition objects of its category, as well as the message set for error_code objects. Objects of these types have no distinct values and are not-copyable and not-assignable, and thus can only be passed by reference. As such, only one object of each of these types shall exist, each uniquely identifying its own category: all error codes and conditions of a same category shall return a reference to same object. Some standard objects are of a type derived from this class. A reference to them can be obtained by calling a specific global function for each:
Member functions (non-virtual)
Virtual member functions
ExampleTo create a custom error category, a program shall derive from the error_category base class and override the virtual functions as needed:
Output:
Home page | Privacy policy
© cplusplus.com, 2000-2026 - All rights reserved - v3.3.4s Spotted an error? contact us | |||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |