A C++ template library for embedded applications
Designed and maintained by
Aster Consulting Ltd

Macros

Many of the features or options in the ETL can be selected by defining macros at the project wide level.
Some macros are defined by the ETL.

User defined

These must be project wide definitions.
ETL_NO_CHECKS ETL_ASSERT has no effect.
ETL_THROW_EXCEPTIONS
ETL_ASSERT throws the specified exception.
ETL_THROW_EXCEPTIONS + ETL_LOG_ERRORS ETL_ASSERT calls the error handler then throws an exception.
ETL_LOG_ERRORS ETL_ASSERT calls the error handler then asserts.
ETL_LOG_ERRORS + NDEBUG ETL_ASSERT calls the error handler.
ETL_CHECK_PUSH_POP Pushes and pops to containers are checked for bounds.
ETL_VERBOSE_ERRORS If this is defined then error messages and ouputted in their long form.
ETL_BITSET_ELEMENT_TYPE If this is defined, then it will become the type used for elements in the bitset class.
Default is
uint_least8_t
ETL_FSM_STATE_ID_TYPE If this is defined, then it will become the type used for FSM state id numbers.
Default is
uint_least8_t
ETL_MESSAGE_ID_TYPE If this is defined, then it will become the type used for message id numbers.
Default is
uint_least8_t
ETL_ISTRING_REPAIR_ENABLE Define this if you wish to memcpy ETL strings and repair them via an istring pointer or reference.
Warning: This will make the container a virtual class.
ETL_IVECTOR_REPAIR_ENABLE Define this if you wish to memcpy ETL vectors and repair them via an ivector pointer or reference.
Warning: This will make the container a virtual class.
ETL_IDEQUE_REPAIR_ENABLE Define this if you wish to memcpy ETL deques and repair them via an ideque pointer or reference.
Warning: This will make the container a virtual class.
ETL defined
Defined in platform.h
ETL_DEBUG This is defined as 1 if DEBUG or _DEBUG is defined. Otherwise 0.
ETL_CPP11_SUPPORTED This is defined as 1 if the compiler supports C++11. Otherwise 0.
ETL_CPP14_SUPPORTED This is defined as 1 if the compiler supports C++14. Otherwise 0.
ETL_8BIT_SUPPORT This is defined as 1 if the platform supports 8 bit char types. Otherwise 0.
ETL_NO_NULLPTR_SUPPORT
This is defined as 1 if compiler does not support nullptr.  Otherwise 0.
ETL_NO_LARGE_CHAR_SUPPORT
This is defined as 1 if the compiler does not support char16_t or char32_t types.
Otherwise 0.
ETL_COMPILER_IAR
ETL_COMPILER_KEIL
ETL_COMPILER_GREEN_HILLS
ETL_COMPILER_INTEL
ETL_COMPILER_MICROSOFT
ETL_COMPILER_GCC
ETL_COMPILER_TI
ETL_COMPILER_MICROTEC
ETL_COMPILER_METAWARE_HIGH
ETL_COMPILER_LLVM
ETL_COMPILER_KAI
ETL_COMPILER_COMEAU
ETL_COMPILER_BORLAND
ETL_COMPILER_ARM
ETL_COMPILER_MPW
ETL_COMPILER_GENERIC
One of these will be defined.