1 | #ifndef BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED |
2 | #define BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED |
3 | |
4 | // Copyright 2001 John Maddock. |
5 | // Copyright 2017 Peter Dimov. |
6 | // |
7 | // Distributed under the Boost Software License, Version 1.0. |
8 | // |
9 | // See accompanying file LICENSE_1_0.txt or copy at |
10 | // http://www.boost.org/LICENSE_1_0.txt |
11 | // |
12 | // BOOST_STRINGIZE(X) |
13 | // BOOST_JOIN(X, Y) |
14 | // |
15 | // Note that this header is C compatible. |
16 | |
17 | // |
18 | // Helper macro BOOST_STRINGIZE: |
19 | // Converts the parameter X to a string after macro replacement |
20 | // on X has been performed. |
21 | // |
22 | #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) |
23 | #define BOOST_DO_STRINGIZE(X) #X |
24 | |
25 | // |
26 | // Helper macro BOOST_JOIN: |
27 | // The following piece of macro magic joins the two |
28 | // arguments together, even when one of the arguments is |
29 | // itself a macro (see 16.3.1 in C++ standard). The key |
30 | // is that macro expansion of macro arguments does not |
31 | // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. |
32 | // |
33 | #define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y) |
34 | #define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X,Y) |
35 | #define BOOST_DO_JOIN2(X, Y) X##Y |
36 | |
37 | #endif // BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED |
38 | |