Python boost inheritance documentation error
Hello,
This is my first post here, but I found some code that generated an error
using Visual Studio 6.0 (with Service Pack 5):
The documentation (url:
http://www.boost.org/libs/python/doc/inheritance.html) said:
[snip]
base_class.def(python::constructor<void>());
[snip]
when I use void at that location the compiler generates an error (although
it
does work without specifying the keyword void). The error is:
c:\BOOST\boost/python/detail/init_function.hpp(319) : error C2440: 'type
cast' : cannot convert from 'void' to 'class
boost::python::detail::reference_parameter<void>'
Expressions of type void cannot be converted to other types
c:\BOOST\boost/python/detail/init_function.hpp(314) : while
compiling class-template member function 'class
boost::python::detail::instance_holder_base *__thiscall
boost::python::detail::init1 :?PWVA%18R7?TJ3O*YJ&^W-^)@O%\-/P&4$L!
M`A0`"@``````"87D+ ````````````````D````````````0`,!!`````'-E
M='1I;F=S+U!+`0(4`!0````(`(][XBQLJ6V_? ```"D!```3``````````$`
M( " @2<```!S971T:6YG
Thanks, fixed in CVS
----- Original Message -----
From: "J.Flenter"
Hello, This is my first post here, but I found some code that generated an error using Visual Studio 6.0 (with Service Pack 5):
The documentation (url: http://www.boost.org/libs/python/doc/inheritance.html) said:
[snip] base_class.def(python::constructor<void>()); [snip] when I use void at that location the compiler generates an error (although it does work without specifying the keyword void). The error is:
c:\BOOST\boost/python/detail/init_function.hpp(319) : error C2440: 'type cast' : cannot convert from 'void' to 'class boost::python::detail::reference_parameter<void>' Expressions of type void cannot be converted to other types c:\BOOST\boost/python/detail/init_function.hpp(314) : while compiling class-template member function 'class boost::python::detail::instance_holder_base *__thiscall boost::python::detail::init1
I do use a different class (included as a zip file), but in this case I don't think that will generate the compiler error.
I hope this makes it clear...
Jacco Flenter
--------------------------------------------------------------------------- -----
participants (2)
-
David Abrahams
-
J.Flenter