decl_binds.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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_BINDS_HPP_
  7. #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BINDS_HPP_
  8. #include <boost/local_function/aux_/preprocessor/traits/decl_/index.hpp>
  9. #include <boost/preprocessor/tuple/elem.hpp>
  10. #include <boost/preprocessor/list/transform.hpp>
  11. // PRIVATE //
  12. #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BIND_APPLY_( \
  13. d, bind_macro, bind_traits) \
  14. bind_macro(bind_traits)
  15. // PUBLIC //
  16. // Expand: pp-list of non-const bind-traits.
  17. #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BINDS(decl_traits) \
  18. BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_MAX, \
  19. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_BINDS, decl_traits)
  20. // Expand: pp-list non-const bind-this-traits (size <= 1 after validation).
  21. #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES(decl_traits) \
  22. BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_MAX, \
  23. BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_INDEX_BIND_THIS_TYPES, \
  24. decl_traits)
  25. #endif // #include guard