master.hpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // (C) Copyright Tobias Schwinger
  2. //
  3. // Use modification and distribution are subject to the boost Software License,
  4. // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
  5. //------------------------------------------------------------------------------
  6. // no include guards, this file is intended for multiple inclusion
  7. #if BOOST_FT_ARITY_LOOP_PREFIX
  8. # ifndef BOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED
  9. # define BOOST_FT_DETAIL_COMPONENTS_IMPL_MASTER_HPP_INCLUDED
  10. # include <boost/preprocessor/cat.hpp>
  11. # include <boost/preprocessor/facilities/empty.hpp>
  12. # include <boost/preprocessor/facilities/identity.hpp>
  13. # include <boost/preprocessor/arithmetic/dec.hpp>
  14. # include <boost/preprocessor/punctuation/comma_if.hpp>
  15. # endif
  16. # define BOOST_FT_type_name
  17. # if !BOOST_FT_mfp
  18. # define BOOST_FT_types \
  19. R BOOST_PP_COMMA_IF(BOOST_FT_arity) BOOST_FT_params(BOOST_PP_EMPTY)
  20. # else
  21. # define BOOST_FT_types \
  22. R, typename class_transform<T0 BOOST_FT_cv, L>::type \
  23. BOOST_PP_COMMA_IF(BOOST_PP_DEC(BOOST_FT_arity)) \
  24. BOOST_FT_params(BOOST_PP_EMPTY)
  25. # endif
  26. #elif BOOST_FT_ARITY_LOOP_IS_ITERATING
  27. template< BOOST_FT_tplargs(BOOST_PP_IDENTITY(typename)), typename L>
  28. struct components_impl<BOOST_FT_type, L>
  29. {
  30. typedef encode_bits<BOOST_FT_flags,BOOST_FT_cc_id> bits;
  31. typedef constant<BOOST_FT_full_mask> mask;
  32. typedef function_types::components<BOOST_FT_type, L> type;
  33. typedef components_mpl_sequence_tag tag;
  34. typedef mpl::integral_c<std::size_t,BOOST_FT_arity> function_arity;
  35. typedef BOOST_PP_CAT(mpl::vector,BOOST_FT_n)< BOOST_FT_types > types;
  36. };
  37. #elif BOOST_FT_ARITY_LOOP_SUFFIX
  38. # undef BOOST_FT_types
  39. # undef BOOST_FT_type_name
  40. #else
  41. # error "attempt to use arity loop master file without loop"
  42. #endif