[C++-sig] V2 bug resurfaces

Peter Bienstman pbienst at MIT.EDU
Wed Apr 3 21:55:29 CEST 2002


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.
      )
    ;
}








More information about the Cplusplus-sig mailing list