forked from boostorg/config
Merge branch 'feature/pragma-message' into develop
# Fixed Conflicts: # doc/html/index.html
This commit is contained in:
commit
5fa3b7d00c
9 files changed
+159
-23
No files matched your search
@@ -103,6 +103,8 @@ test-suite config
|
||||
[ run cstdint_test2.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ]
|
||||
[ compile cstdint_include_test.cpp : <warnings>all <toolset>gcc:<cxxflags>-Wextra ]
|
||||
[ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals ] ]
|
||||
[ run helper_macros_test.cpp ]
|
||||
[ compile pragma_message_test.cpp ]
|
||||
;
|
||||
|
||||
obj has_clang_implicit_fallthrough : cmd_line_check.cpp :
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright 2017 Peter Dimov.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
//
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config/helper_macros.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
#define X pumpkin
|
||||
|
||||
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(X), "pumpkin" );
|
||||
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(__LINE__), "16" );
|
||||
|
||||
#define Y 2
|
||||
|
||||
int BOOST_JOIN(X, Y) = 0;
|
||||
(void)pumpkin2;
|
||||
|
||||
int BOOST_JOIN(X, __LINE__) = 0;
|
||||
(void)pumpkin23;
|
||||
|
||||
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(BOOST_JOIN(X, Y)), "pumpkin2" );
|
||||
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(BOOST_JOIN(X, __LINE__)), "pumpkin27" );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright 2017 Peter Dimov.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
//
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
BOOST_PRAGMA_MESSAGE("first message")
|
||||
|
||||
#define MSG2 "second message"
|
||||
BOOST_PRAGMA_MESSAGE(MSG2)
|
||||
|
||||
#include <boost/config.hpp> // BOOST_STRINGIZE
|
||||
|
||||
#define MSG3 third message
|
||||
BOOST_PRAGMA_MESSAGE(BOOST_STRINGIZE(MSG3))
|
||||
Reference in new issue
Block a user