[C++-sig] another V2 bug

David Abrahams david.abrahams at rcn.com
Wed Apr 3 19:31:54 CEST 2002


Fixed, thanks!

----- Original Message ----- 
From: "Peter Bienstman" <pbienst at MIT.EDU>
To: <c++-sig at python.org>
Sent: Wednesday, April 03, 2002 11:07 AM
Subject: [C++-sig] another V2 bug


> Adding a second argument to an otherwise identical function fails to
> compile:
> 
> #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&) {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.
>       )
>     ;
> }
> 







More information about the Cplusplus-sig mailing list