Macros
InsightsStrongTypes.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STRONG_BOOL(typeName)
 A more than simple typsafe bool. More...
 

Macro Definition Documentation

◆ STRONG_BOOL

#define STRONG_BOOL (   typeName)
Value:
enum class typeName : bool \
{ \
No = false, \
Yes = true \
}

A more than simple typsafe bool.

This macro creates a class enum with two enumerators:

  • No
  • Yes

Usage:

STRONG_BOOL(AddNewLine);
void Foo(AddNewLine);
...
void Bar() {
Foo(AddNewLine::Yes);
}
#define STRONG_BOOL(typeName)
A more than simple typsafe bool.

Definition at line 26 of file InsightsStrongTypes.h.