My Project
Classes | Variables
basic_errc_type.hpp File Reference
#include "cstdint.hpp"
#include "string_view.hpp"
#include "move.hpp"

Go to the source code of this file.

Classes

class  bsl::basic_errc_type< T, SUCCESS >
 Defines an error code. We do not use the same pattern as the standard library. The goal is to ensure an error code can consume a single register to ensure maximum compatibility with different CPU archiectures that only have a 32bit return register. We also do not use an enum to ensure custom error codes can be created. This also means there are no error code categories. Instead, an error code is checked if it is negative, and unchecked if it is positive to align with AUTOSAR. Finally, we provide the ability to change the type that an error code uses under the hood which allows you to use a "long" type, or some other integer type depending on your requirements (i.e., NTSTATUS). More...
 

Variables

constexpr basic_errc_type bsl::errc_success {0}
 Defines the "no error" case.
 
constexpr basic_errc_type bsl::errc_failure {1}
 Defines the general unchecked error case.
 
constexpr basic_errc_type bsl::errc_precondition {2}
 Defines the general precondition error case.
 
constexpr basic_errc_type bsl::errc_postcondition {3}
 Defines the general postcondition error case.
 
constexpr basic_errc_type bsl::errc_assetion {4}
 Defines the general assertion error case.
 
constexpr basic_errc_type bsl::errc_invalid_argument {10}
 Defines an invalid argument error code.
 
constexpr basic_errc_type bsl::errc_index_out_of_bounds {11}
 Defines an out of bounds error code.
 
constexpr basic_errc_type bsl::errc_bad_function {12}
 Defines an out of bounds error code.
 
constexpr basic_errc_type bsl::errc_unsigned_wrap {30}
 Defines an overflow, underflow or unsigned wrap error.
 
constexpr basic_errc_type bsl::errc_narrow_overflow {31}
 Defines an overflow, underflow or unsigned wrap error.
 
constexpr basic_errc_type bsl::errc_signed_overflow {32}
 Defines an overflow, underflow or unsigned wrap error.
 
constexpr basic_errc_type bsl::errc_divide_by_zero {33}
 Defines a divide by zero error.
 
constexpr basic_errc_type bsl::errc_nullptr_dereference {34}
 Defines an out of bounds error code.
 

Detailed Description