|
Boost : |
Subject: Re: [boost] [msvc] #warning preprocessor directive
From: Peter Dimov (lists_at_[hidden])
Date: 2017-10-17 16:24:59
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. :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk