Boost logo

Boost :

Subject: [boost] BOOST_PRAGMA_MESSAGE?
From: Peter Dimov (lists_at_[hidden])
Date: 2017-12-02 21:20:17


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" )

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