c++-sig@python.org
[Top] [All Lists]

Re: [C++-sig] gcc and explicit method types

Subject: Re: [C++-sig] gcc and explicit method types
From: Stefan Seefeld
Date: Fri, 02 Sep 2005 17:56:18 -0400
Gregory Price wrote:
> Thanks for this library.  I've been exposing
> some of my company's C++ code base to Python,
> controlling it from there, and it's already got
> some people excited about what we'll be able to do.
> As I port the wrapper from MSVC to GCC,
> I'm having some unexpected trouble
> that I hope you can help me with.
> 
> 
> I'm compiling the following module:
> 
> ---- begin foo.cpp ----
> #include <boost/python.hpp>
> 
> using namespace boost::python;
> 
> class A {
> public:
>   A();
>   int f();
> };
> 
> BOOST_PYTHON_MODULE(foo)
> {
>   class_<A>("A")
>     .def("f", A::f);

_______________^

that should be '&A::f'

> }
> ---- end foo.cpp ----
> 
> Using Visual Studio (with whatever enormous inscrutable
> command line is produced by my project settings)[1],
> this compiles and works fine.

Yeah, I noticed that MSVC accepted the above, even though
the correct syntax requires the address-of operator.

Regards,
                Stefan
_______________________________________________
C++-sig mailing list
C++-sig@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/c++-sig

<Prev in Thread] Current Thread [Next in Thread>