-
Notifications
You must be signed in to change notification settings - Fork 0
debug.h ~ debug ~ level
Baptiste Thémine edited this page Jul 5, 2020
·
5 revisions
template <short flag> std::ios& level(std::ios &ios) noexcept;
Sets debug flag to the specified level in iostream. Calls the function debug::flag.
-
flag
--> integer between 0 and 3 corresponding to the level of debug (0 =debug::off
, N =debug::levelN
). -
ios
--> reference to an iostream object.
Returns a reference to ios
passed in argument.
Never throws exception. If call to debug::flag fails, the debug flag is unchanged and the iostream state is set to std::badbit
.
#include <iostream>
#include <JLC/debug.h>
int main(){
std::cout << debug::level<0>;
std::cin >> debug::level<3>;
}