[C++-sig] V2 bug resurfaces
David Abrahams
david.abrahams at rcn.com
Wed Apr 3 23:42:47 CEST 2002
Well, there's currently a limit on the number of supported arguments
(6), and you've exceeded it. When I get a chance (in the next few days)
I'll be using the Preprocessor lib. to generate support for an arbitrary
number of args... or you could do it; patches welcome.
----- Original Message -----
From: "Peter Bienstman" <pbienst at MIT.EDU>
To: <c++-sig at python.org>
Sent: Wednesday, April 03, 2002 2:55 PM
Subject: [C++-sig] V2 bug resurfaces
> A slightly modified version of my previous bug report, now with more
> than 2 arguments, fails in a similar way.
>
> #define BOOST_PYTHON_DYNAMIC_LIB
> #define BOOST_PYTHON_V2
>
> #include <boost/python/module.hpp>
> #include <boost/python/class.hpp>
>
> struct C {};
>
> struct FE {};
>
> struct MWG
> {
> const FE fe (const C&) {return FE();}
> const FE fe2(const C&, const C&,int,int,int,int,int,int,int,int)
> {return FE();}
> };
>
> BOOST_PYTHON_MODULE_INIT(m)
> {
> using namespace boost::python;
>
> module m("m");
>
> m
> .add(class_<C>("C"))
> .add(class_<FE>("FE"))
> .add(
> class_<MWG>("MWG")
> .def("fe", &MWG::fe) // this compiles.
> .def("fe2", &MWG::fe2) // this doesn't.
> )
> ;
> }
>
>
>
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
More information about the Cplusplus-sig
mailing list