-
Notifications
You must be signed in to change notification settings - Fork 0
debug.h ~ debug ~ flag_type
Baptiste Thémine edited this page Jul 5, 2020
·
6 revisions
namespace debug::flags { enum flag_type /* implementation defined */ }
Defines typename flag_type
and constants used by debug functions.
The following constants are accessible through namespaces debug
and debug::flags
:
Name | Value | Description |
---|---|---|
off | 0 | Disables debug output. |
on | 1 | Enables debug output to lowest level. |
level1 | 1 | Enables debug output to level 1. |
level2 | 2 | Enables debug output to level 2. |
level3 | 3 | Enables debug output to level 3. |
Debug flags are essentially used within switch
statements such as below example.
switch(debug::flag(cout)){
default :
case debug::on : //...
case debug::off : //...
}
switch(debug::flag(cout)){
using namespace debug::flags;
default :
case level3 : //...
case level2 : //...
case level1 : //...
case off : //...
}