MDL: added include/poet/Macros.hpp

This commit is contained in:
Marco De Lucia 2023-08-09 12:20:55 +02:00
parent 4181e189a1
commit b08697f9d4

14
include/poet/Macros.hpp Normal file
View File

@ -0,0 +1,14 @@
// Time-stamp: "Last modified 2023-08-09 12:10:57 delucia"
#ifndef MACROS_H
#define MACROS_H
// Prepend "msg" with name of calling function
#define MSG(msg) std::cout << "CPP: " << __func__ << ": " << std::string(msg) << std::endl;
#define MSG_NOENDL(msg) std::cout << "CPP: " << __func__ << ": " << std::string(msg);
#define ERRMSG(msg) std::cerr << "CPP_ERROR: " << __func__ << ": " << std::string(msg) << std::endl;
#define BOOL_PRINT(bool) std::string(bool ? "ON" : "OFF")
#endif // MACROS_H