Workspace 6.21.5
|
Generic class which is only defined when the template parameter is true
.
More...
#include <Workspace/Application/LanguageUtils/typet.h>
This template class is designed to be used as a private base class. You would use it by specifying some condition which evaluates to a boolean or can be converted to bool under the rules C++ dictates (keep it simple - just use bool or int). Because the class is only defined when the condition is true
, any attempt to use it with a false
condition will cause compilation to fail. This is how the class enforces the specified condition at compile time. With compiler optimizations turned on, there should be no cost in terms of space or performance at run-time.