
17 Oct
2017
17 Oct
'17
4:24 p.m.
Beman Dawes wrote:
There is a hack on Stackoverflow https://stackoverflow.com/questions/5966594 to use a macro cascade to solve the problem.
Yes, one can always use #define STR(x) STR2(x) #define STR2(x) #x #pragma message( __FILE__ "(" STR(__LINE__) "): warning: " "#warning foo" ) or even #define BOOST_MESSAGE(msg) message( __FILE__ "(" STR(__LINE__) "): warning: " "#warning " #msg ) #pragma BOOST_MESSAGE(foo) but that's not the point, is it. :-)