File indexing completed on 2025-01-19 09:46:08
0001
0002
0003
0004
0005 #ifndef BASES_DWA2002321_HPP
0006 # define BASES_DWA2002321_HPP
0007
0008 # include <boost/python/detail/prefix.hpp>
0009 # include <boost/python/detail/type_list.hpp>
0010 # include <boost/python/detail/type_traits.hpp>
0011 # include <boost/mpl/if.hpp>
0012 # include <boost/mpl/bool.hpp>
0013 # include <boost/preprocessor/enum_params_with_a_default.hpp>
0014 # include <boost/preprocessor/enum_params.hpp>
0015
0016 namespace boost { namespace python {
0017
0018 # define BOOST_PYTHON_BASE_PARAMS BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PYTHON_MAX_BASES, Base)
0019
0020
0021 template < BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PYTHON_MAX_BASES, typename Base, mpl::void_) >
0022 struct bases : detail::type_list< BOOST_PYTHON_BASE_PARAMS >::type
0023 {};
0024
0025 namespace detail
0026 {
0027 template <class T> struct specifies_bases
0028 : mpl::false_
0029 {
0030 };
0031
0032 template < BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PYTHON_MAX_BASES, class Base) >
0033 struct specifies_bases< bases< BOOST_PYTHON_BASE_PARAMS > >
0034 : mpl::true_
0035 {
0036 };
0037 template <class T, class Prev = bases<> >
0038 struct select_bases
0039 : mpl::if_<
0040 specifies_bases<T>
0041 , T
0042 , Prev
0043 >
0044 {
0045 };
0046 }
0047 # undef BOOST_PYTHON_BASE_PARAMS
0048 }}
0049
0050 #endif