type_list.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright David Abrahams 2002.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef TYPE_LIST_DWA2002913_HPP
  6. # define TYPE_LIST_DWA2002913_HPP
  7. # include <boost/config.hpp>
  8. # include <boost/python/detail/preprocessor.hpp>
  9. # include <boost/preprocessor/arithmetic/inc.hpp>
  10. # if BOOST_PYTHON_MAX_ARITY + 2 > BOOST_PYTHON_MAX_BASES
  11. # define BOOST_PYTHON_LIST_SIZE BOOST_PP_INC(BOOST_PP_INC(BOOST_PYTHON_MAX_ARITY))
  12. # else
  13. # define BOOST_PYTHON_LIST_SIZE BOOST_PYTHON_MAX_BASES
  14. # endif
  15. // Compute the MPL vector header to use for lists up to BOOST_PYTHON_LIST_SIZE in length
  16. # if BOOST_PYTHON_LIST_SIZE > 48
  17. # error Arities above 48 not supported by Boost.Python due to MPL internal limit
  18. # elif BOOST_PYTHON_LIST_SIZE > 38
  19. # include <boost/mpl/vector/vector50.hpp>
  20. # elif BOOST_PYTHON_LIST_SIZE > 28
  21. # include <boost/mpl/vector/vector40.hpp>
  22. # elif BOOST_PYTHON_LIST_SIZE > 18
  23. # include <boost/mpl/vector/vector30.hpp>
  24. # elif BOOST_PYTHON_LIST_SIZE > 8
  25. # include <boost/mpl/vector/vector20.hpp>
  26. # else
  27. # include <boost/mpl/vector/vector10.hpp>
  28. # endif
  29. # include <boost/python/detail/type_list_impl.hpp>
  30. #endif // TYPE_LIST_DWA2002913_HPP