Quick Links: |
Provide a standard compliant version of errc
.
More...
errc
. bsl::errc | namespace for errc enumeration type |
bsl::ErrcEnum | typedef for bsl::errc::Enum or std::errc |
bsl::errc::Enum
, and marks it eligible to participate as an error condition in the system_error
facility. In C++11 mode, the vendor-supplied <system_error>
implementation is used instead, and the corresponding names from std
are imported into bsl
. bsl::ErrcEnum
that can be used as the type of the errc
enumeration in both C++03 and C++11 mode. Because errc
is defined in C++11 as an enum class
, we cannot emulate use of std::errc
in C++03 mode - that tag can either be used to qualify the enumeration literals or name the type, but not both. This component chooses to have bsl::errc
be the literal qualifier and bsl::ErrcEnum
be the type so to use this component portably, one would, for example, write bsl::ErrcEnum error_value = bsl::errc::io_error;
errno
system error values. We can use the errc
from the system_error
facility of the C++ standard for this. strtod("1e2000", 0);
bsl::ErrcEnum expected = bsl::errc::result_out_of_range; assert(static_cast<int>(expected) == errno);