1 2 3 4 5 6 7 8 9 10 11
#pragma once #include <cstdio> //#define DEBUG #if !defined(LOG) && defined(DEBUG) #define LOG(fmt, ...) do { fprintf(stderr, "%s() " fmt, __func__, ##__VA_ARGS__); } while (0) #else #define LOG(fmt, ...) do {} while (0) #endif