EmptyPolicy Struct Reference
EmptyPolicy is a policy template for the compile time selection utility IF_CONTAINS_TYPE_(NAME). More...
#include <EmptyPolicy.h>
Static Public Member Functions | |
template<typename T , typename NoSubType , typename R > | |
static R | process () |
The method is provided for calling within the context of a selector template. As the name of the policy class describes this needs to be empty. |
Detailed Description
EmptyPolicy is a policy template for the compile time selection utility IF_CONTAINS_TYPE_(NAME).
It provides the else (ElsePolicyExample) path of the compile time switch if no else policy template is given by the user. It evaluates to an empty function, leading to no code execution except the call itself, but in case of completely inlining (as the attribute enforces) it is quite compiled away.
Member Function Documentation
template<typename T , typename NoSubType , typename R >
static R EmptyPolicy::process | ( | ) | [inline, static] |
The method is provided for calling within the context of a selector template. As the name of the policy class describes this needs to be empty.
- Template Parameters:
-
T is a type normally a configuration type/class NoSubType is a type and you can not instantiate an object of it. Trying instantiation, leads to a compile time error if the policy is used in the context of IF_CONTAINS_TYPE_(NAME) R is the return value of the static process method and its default is void
The documentation for this struct was generated from the following file:
- include/config/policies/EmptyPolicy.h