Back to home page

EIC code displayed by LXR

 
 

    


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_PP_BIND_TRAITS_HPP_
0009 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_HPP_
0010 
0011 #include <boost/preprocessor/tuple/elem.hpp>
0012 
0013 // PRIVATE //
0014 
0015 // Non-this bind is 2-tuple `(name_without_type, name_with_type)`.
0016 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_WITHOUT_TYPE_ 0
0017 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_WITH_TYPE_    1
0018 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_MAX_          2
0019 
0020 // This bind is 1-typle `([type_] EMPTY)`.
0021 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_THIS_TRAITS_INDEX_TYPE_    0
0022 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_THIS_TRAITS_INDEX_MAX_     1
0023 
0024 // PUBLIC //
0025 
0026 // Expand: `[&] var_`.
0027 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_VAR_WITHOUT_TYPE(bind_traits) \
0028     BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_MAX_, \
0029             BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_WITHOUT_TYPE_, \
0030             bind_traits)
0031 
0032 // Expand: `[type_ [&] var_]` (EMPTY if no type_ specified).
0033 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_VAR_WITH_TYPE(bind_traits) \
0034     BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_MAX_, \
0035             BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_INDEX_WITH_TYPE_, \
0036             bind_traits)(/* expand EMPTY */)
0037 
0038 // Expand: `[type_]` (EMPTY if no type_ specified).
0039 #define BOOST_LOCAL_FUNCTION_AUX_PP_BIND_TRAITS_THIS_TYPE(bind_this_traits) \
0040     BOOST_PP_TUPLE_ELEM( \
0041             BOOST_LOCAL_FUNCTION_AUX_PP_BIND_THIS_TRAITS_INDEX_MAX_, \
0042             BOOST_LOCAL_FUNCTION_AUX_PP_BIND_THIS_TRAITS_INDEX_TYPE_, \
0043             bind_this_traits)(/* expand EMPTY */)
0044 
0045 #endif // #include guard
0046