Skip to content

Commit

Permalink
whenlog
Browse files Browse the repository at this point in the history
  • Loading branch information
mpmilano committed Jul 12, 2018
1 parent afe1622 commit 4648581
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions macro_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
namespace mutils { void error_and_abort(char const * const) __attribute__((noreturn)); }
#define assert_always(x...) if(!(x)){::mutils::error_and_abort(#x);}
#endif
#ifndef NOLOG
#define whenlog(x...) x
#else
#define whenlog(x...)
#endif

#define MACRO_GET_1(str, i) \
(sizeof(str) > (i) ? str[(i)] : 0)
Expand Down

0 comments on commit 4648581

Please sign in to comment.