XLE  v0.02.0
Static Public Member Functions | List of all members
constant_expression< B > Struct Template Reference

Wraps a compile condition for a if() statement More...

#include <Prefix.h>

Static Public Member Functions

static bool result ()
 

Detailed Description

template<bool B>
struct constant_expression< B >

Wraps a compile condition for a if() statement

Visual Studio produces "Conditional Expression is Constant" warnings when a static boolean value is used in a condition. This is a simple way to explicitly specify that the condition is a static/compile time condition and avoid any warnings. eg:

@code
if (constant_expression<sizeof(void*) == 4>::result()) {
...
}
\endcode

The documentation for this struct was generated from the following file: