Boost logo

Boost :

Subject: Re: [boost] BOOST_PRAGMA_MESSAGE?
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-12-02 22:03:30


On 12/2/2017 4:20 PM, Peter Dimov via Boost wrote:
> In what module does the following utility macro:
>
> #if defined( __GNUC__ )
> #define BOOST_PRAGMA_MESSAGE_IMPL_1( x ) _Pragma( #x )
> #define BOOST_PRAGMA_MESSAGE( x ) BOOST_PRAGMA_MESSAGE_IMPL_1( message(
> x ) )
> #elif defined( _MSC_VER )
> #define BOOST_PRAGMA_MESSAGE_IMPL_2( x, f, ln ) __pragma( message( f "("
> #ln "): note: " x  ) )
> #define BOOST_PRAGMA_MESSAGE_IMPL_1( x, f, ln )
> BOOST_PRAGMA_MESSAGE_IMPL_2( x, f, ln )
> #define BOOST_PRAGMA_MESSAGE( x ) BOOST_PRAGMA_MESSAGE_IMPL_1( x,
> __FILE__, __LINE__ )
> #else
> #define BOOST_PRAGMA_MESSAGE( x )
> #endif
>
> belong?
>
> Use:
>
> BOOST_PRAGMA_MESSAGE( "something" )

Shouldn't this be:

BOOST_PRAGMA_MESSAGE( something )

>
> MS output:
>
> .\testbed.cpp(10): note: something
>
> g++ output:
>
> testbed.cpp:10:35: note: #pragma message: something
> BOOST_PRAGMA_MESSAGE( "something" )


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk