$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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. :-)