EtcPal
HEAD (unstable)
ETC Platform Abstraction Layer (EtcPal)
|
View other versions:
|
C++ Wrappers for EtcPal modules.
EtcPal is primarily a C-language library, but C++ language wrappers for certain modules are provided for convenience when writing C++ code that uses EtcPal. To include a C++ wrapper for a given module, where you would normally include "etcpal/[module].h"
, instead include "etcpal/cpp/[module].h"
.
Some C++ wrapper modules contain types that directly wrap a type defined in a core EtcPal module. These types follow a C++ namespace convention which matches the C-style namespacing of the items they are wrapping. For example, the struct EtcPalIpAddr has a C++ wrapper class called etcpal::IpAddr. It takes up the same space in memory as an EtcPalIpAddr and can be compared to and converted implicitly from EtcPalIpAddr. Explicit conversions can be made in the opposite direction using etcpal::IpAddr::get().
Macros | |
#define | ETCPAL_CONSTEXPR_14 |
Stand-in for "constexpr" on entities that can only be defined "constexpr" in C++14 or later. | |
#define | ETCPAL_CONSTEXPR_14_OR_INLINE inline |
Defined to "constexpr" in C++14 or later, "inline" earlier. | |
#define | ETCPAL_NO_EXCEPTIONS |
Explicitly removes all "throw" statements from EtcPal C++ headers. More... | |
#define ETCPAL_NO_EXCEPTIONS |
Explicitly removes all "throw" statements from EtcPal C++ headers.
The EtcPal headers also attempt to organically detect whether exceptions are enabled using various standard defines. This definition is available to explicitly disable exceptions if that method does not work.