decl_const_binds.hpp 1.4 KB

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