From b08697f9d4e8514839489d8b0eed4f17eb9ed057 Mon Sep 17 00:00:00 2001 From: Marco De Lucia Date: Wed, 9 Aug 2023 12:20:55 +0200 Subject: [PATCH] MDL: added include/poet/Macros.hpp --- include/poet/Macros.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/poet/Macros.hpp diff --git a/include/poet/Macros.hpp b/include/poet/Macros.hpp new file mode 100644 index 000000000..f632ea3ee --- /dev/null +++ b/include/poet/Macros.hpp @@ -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