I have a macro, something like:
#define LOG(level, format, ...) \
Logger::get_logger("default").log_message(level, \
__FILE__, __LINE__, __FUNCTION__, typeid(this).name(), \
format, __VA_ARGS__)
But this macro will be called not only inside class instances. Of course, in a plain function, I can't use this
pointer. How can I understand (i.e., using templates, boost::tti and etc), that my code is used inside a class instance or not?
Aucun commentaire:
Enregistrer un commentaire