|
cxxomfort
rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Backports and interfaces related to Standard header <system_error>
(or automatically by including <cxxomfort/backports.hpp> / <cxxomfort/cxxomfort.hpp>)
In new C++, <system_error> provides general facilities for dealing with error codes and categorization of error types and error returns (eg.: errno ) using a schema alternative and complimentary to eg.: exceptions.
Interfaces defined in this file:
errc - enumerator type for error codes, basically a typesafe version of errno .error_category() , generic_category() , system_category() - marker functions that reference the category object that an error is being implemented in.error_condition - a sort of platform-agnostic error code. cxxomfort::cxxostd::error_code platform-dependent "error_code" .make_error_code() Non-backport interfaces (cxxomfort::fix):
errc - Alias to errc::errc in MSVC 2010, normal std::errc otherwise.to_errc() - Create an errc value from a native integer, a sort of safe type cast.The listing of error codes that cxxomfort supports is compiler-specific and mostly depends on the operating system and C++ Standard conformance level. In general, when in >=C++11 mode the listing present at https://en.cppreference.com/w/cpp/error/errc is supporte.
In pre-C++11 mode (or in eg.: MSVC on Windows), a subset of those names are detected automatically and the extension cxxomfort::fix::errc provides access to some other names not normally provided by the compiler.
For sections of cxxomfort making use of these facilities (even in C++03 mode), see: cxxo-sup-iterator , at_or, fixed_vector , cxxo_array_ref .
1.8.13