![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
C++17 added support for declaring inline variables, which allow variables to be defined in header files without violating the One Definition Rule (ODR). To allow similar functionality in C++14, arene-base provides a facility, ARENE_CPP14_INLINE_VARIABLE(type,name), for creating "inline variables" in C++14. This primarily intended to ease the creation of Niebloid-like function objects. The public header is:
An example of defining a function object using the macro can be seen below:
constexpr default constructible.