ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
[C++-sig] Re : How to wrap this overloaded member function whose return type is reference ?
by horace(seednet) other posts by this author
Feb 22 2003 5:05PM messages near this date
[C++-sig] Re: C++ object from PyObject pointer | Re: [C++-sig] Re : How to wrap this overloaded member function whose return type is reference ?
Dave Abrahams wrote :

>  Can you post the error message(s) you get?  That would be a nice =
start.

Ok, Dave, If you want to see those error messages, here you go. Last =
time I thought it wasn't too polite to dump those lengthy error messages =
here.

for this line of code :

  .def_readonly("origin",&point3d::origin)

I got=20

D:\test\point3d.cpp(6) : error C2784: 'class boost::python::class_<class =
point3d,struct boost::python::detail::not_specified,struct =
boost::python::detail::not_specified,struct =
boost::python::detail::not_specified>  &__thiscall=20
boost::python::class_<class point3d,struct =
boost::python::detail::not_specified,struct =
boost::python::detail::not_specified,struct =
boost::python::detail::not_specified> ::def_readonly(const char *, =
point3d::*)' : could not deduce template argument for ' point3d::*' from =
'const class point3d *'


for this line of code  :

  .def("set",(point3d& (point3d::*)(double, double, double)) =
point3d::set,args("x", "y", "z"))=20

I got=20

d:\boost_1_29_0\boost/python/detail/returning.hpp(175) : error C2079: =
'cr' uses undefined struct =
'specify_a_result_policy_to_wrap_functions_returning<class point3d &> '
        d:\boost_1_29_0\boost/python/detail/caller.hpp(100) : see =
reference to function template instantiation 'struct _object *__cdecl =
boost::python::detail::returning<class point3d &> ::call(class point3d =
&(__thiscall point3d::*)(double
,double,double),struct _object *,struct _object *,const struct =
boost::python::default_call_policies *)' being compiled
d:\boost_1_29_0\boost/python/detail/returning.hpp(176) : error C2228: =
left of '.convertible' must have class/struct/union type
        d:\boost_1_29_0\boost/python/detail/caller.hpp(100) : see =
reference to function template instantiation 'struct _object *__cdecl =
boost::python::detail::returning<class point3d &> ::call(class point3d =
&(__thiscall point3d::*)(double
,double,double),struct _object *,struct _object *,const struct =
boost::python::default_call_policies *)' being compiled
d:\boost_1_29_0\boost/python/detail/returning.hpp(181) : error C2064: =
term does not evaluate to a function
        d:\boost_1_29_0\boost/python/detail/caller.hpp(100) : see =
reference to function template instantiation 'struct _object *__cdecl =
boost::python::detail::returning<class point3d &> ::call(class point3d =
&(__thiscall point3d::*)(double
,double,double),struct _object *,struct _object *,const struct =
boost::python::default_call_policies *)' being compiled
Error executing cl.exe.

I think my problem in using Boost.Python is that I don't know what I'm =
doing. =20
Attachments:
unknown1

Thread:
horace(seednet)
David Abrahams
Nicodemus
David Abrahams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved