Classes |
|
struct | senf::mpl::nil |
Marker class for empty default values etc. More... |
|
struct | senf::mpl::rv< n > |
Return-value type used to implement overload selection. More... |
|
struct | senf::mpl::take_uint< _ > |
Take an arbitrary unsigned integer template argument. More... |
|
struct | senf::mpl::take_int< _ > |
Take an arbitrary integer template argument. More... |
|
struct | senf::mpl::take_class< _ > |
Take an arbitrary type template argument. More... |
|
Defines |
|
#define | SENF_MPL_RV(expr) |
Get return value of overload selector. |
|
#define | SENF_MPL_SLOT_DEF(name, value) |
Define MPL slot. |
|
#define | SENF_MPL_SLOT_SET(name, value) |
Set MPL slot. |
|
#define | SENF_MPL_SLOT_GET(name) |
Get current MPL slot value. |
#define | ||||
SENF_MPL_RV | ( | expr | ) | |
Get return value of overload selector.
Used together with senf::mpl::rv to implement overload selection.
#define | ||||
SENF_MPL_SLOT_DEF | ( | name, | ||
value | ) | |||
Define MPL slot.
The slot macros SENF_MPL_SLOT_DEF(), SENF_MPL_SLOT_SET() and SENF_MPL_SLOT_GET() provide a facility to get the last unsigned integer value assigned to the slot before the current point in the current class.
struct Foo { // Define SLOT slot named 'accum' initialized to 0 SENF_MPL_SLOT_DEF(accum, 0); // Add 2 to 'accum' SENF_MPL_SLOT_SET(accum, SENF_MPL_SLOT_GET(accum) + 2); // Multiply 'accum' by 3 SENF_MPL_SLOT_SET(accum, SENF_MPL_SLOT_GET(accum) * 3); // Define the result as a constant expression. result is now 6 static unsigned result = SENF_MPL_SLOT_GET(accum); };
#define | ||||
SENF_MPL_SLOT_GET | ( | name | ) | |
#define | ||||
SENF_MPL_SLOT_SET | ( | name, | ||
value | ) | |||