[C++-sig] bases<> from an MPL sequence

Giuseppe Ottaviano giuott at tin.it
Wed Apr 18 21:03:00 CEST 2007


[I sent this message to the Boost ML but had no answer, hope here I
have more luck :) ]

Hi,
I have the base class types of a given class in an MPL sequence (a
mpl::vector). I have to expose this class via Boost.Python, passing a
bases<...> argument to the class_ declaration.
For example, if I have mpl::vector<A, B> I should pass bases<A, B>.

Is there a way to convert a generic MPL sequence to a bases<> sequence?
I haven't found an easy way to do it (push_back<> on bases<> doesn't
return a bases<> type, so boost::python::detail::specifies_bases<>
fails)

Thanks.

-- 
Giuseppe Ottaviano <giuott_at_[hidden]>



More information about the Cplusplus-sig mailing list