|
||||
File indexing completed on 2025-01-18 09:39:14
0001 0002 // Copyright (C) 2009-2012 Lorenzo Caminiti 0003 // Distributed under the Boost Software License, Version 1.0 0004 // (see accompanying file LICENSE_1_0.txt or a copy at 0005 // http://www.boost.org/LICENSE_1_0.txt) 0006 // Home at http://www.boost.org/libs/local_function 0007 0008 #ifndef BOOST_LOCAL_FUNCTION_AUX_SYMBOL_HPP_ 0009 #define BOOST_LOCAL_FUNCTION_AUX_SYMBOL_HPP_ 0010 0011 #include <boost/preprocessor/cat.hpp> 0012 #include <boost/preprocessor/seq/cat.hpp> 0013 #include <boost/preprocessor/seq/transform.hpp> 0014 0015 // PRIVATE // 0016 0017 // NOTE: INFIX is used to separate symbols concatenated together. Some of these 0018 // symbols are user-defined so they can be anything. Because they can contain 0019 // underscore `_` and/or start with capital letters, it is NOT safe for the 0020 // INFIX to be the underscore `_` character because that could lead to library 0021 // defined symbols containing double underscores `__` or a leading underscore 0022 // (followed or not by a capital letter) in the global namespace. All these 0023 // symbols are reserved by the C++ standard: (1) "each name that contains a 0024 // double underscore (_ _) or begins with an underscore followed by an 0025 // uppercase letter is reserved to the implementation" and (2) "each name that 0026 // begins with an underscore is reserved to the implementation for use as a 0027 // name in the global namespace". 0028 #define BOOST_LOCAL_FUNCTION_AUX_SYMBOL_INFIX_ X // `X` used as separator. 0029 0030 #define BOOST_LOCAL_FUNCTION_AUX_SYMBOL_PREFIX_ boost_local_function_aux 0031 0032 #define BOOST_LOCAL_FUNCTION_AUX_SYMBOL_POSTFIX_(s, unused, tokens) \ 0033 BOOST_PP_CAT(tokens, BOOST_LOCAL_FUNCTION_AUX_SYMBOL_INFIX_) 0034 0035 // PUBLIC // 0036 0037 // Prefixes this library reserved symbol. 0038 #define BOOST_LOCAL_FUNCTION_AUX_SYMBOL(seq) \ 0039 BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM( \ 0040 BOOST_LOCAL_FUNCTION_AUX_SYMBOL_POSTFIX_, \ 0041 ~, (BOOST_LOCAL_FUNCTION_AUX_SYMBOL_PREFIX_) seq )) 0042 0043 // Postfixes this library reserved symbol. 0044 #define BOOST_LOCAL_FUNCTION_AUX_SYMBOL_POSTFIX(seq) \ 0045 BOOST_PP_SEQ_CAT(BOOST_PP_SEQ_TRANSFORM( \ 0046 BOOST_LOCAL_FUNCTION_AUX_SYMBOL_POSTFIX_, \ 0047 ~, seq (BOOST_LOCAL_FUNCTION_AUX_SYMBOL_PREFIX_) )) 0048 0049 #endif // #include guard 0050
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |