1 
2 // Copyright (C) 2009-2012 Lorenzo Caminiti
3 // Distributed under the Boost Software License, Version 1.0
4 // (see accompanying file LICENSE_1_0.txt or a copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 // Home at http://www.boost.org/libs/local_function
7 
8 #ifndef BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BINDS_HPP_
9 #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BINDS_HPP_
10 
11 #include <boost/local_function/aux_/preprocessor/traits/bind.hpp>
12 #include <boost/local_function/aux_/preprocessor/traits/decl_/index.hpp>
13 #include <boost/preprocessor/tuple/elem.hpp>
14 #include <boost/preprocessor/list/transform.hpp>
15 
16 // PRIVATE //
17 
18 #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BIND_APPLY_( \
19         d, bind_macro, bind_traits) \
20     bind_macro(bind_traits)
21 
22 // PUBLIC //
23 
24 // Expand: pp-list of const bind-traits.
25 #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BINDS(decl_traits) \
26     BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_MAX, \
27             BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_CONST_BINDS, \
28             decl_traits)
29 
30 // Expand: pp-list of const bind-this-traits (size <= 1 after validation).
31 #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
32         decl_traits) \
33     BOOST_PP_TUPLE_ELEM( \
34           BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_MAX \
35         , BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_CONST_BIND_THIS_TYPES \
36         , decl_traits \
37     )
38 
39 #endif // #include guard
40 
41