Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-19 23:03:13


As the docs say, libs/python/test/comprehensive[.h,.cpp,.py] contains a
working example of nearly everything ;-)


----- Original Message -----
From: "Eric van Riet Paap" <eric_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, March 19, 2001 5:55 PM
Subject: [boost] enums in python.boost

Does anyone have a working sample with enums, 'cause this code below gives
an compile error with MSVC6 SP5

----------- code snipped below

enum KEY
 TAB =8,
 CR =10,
 ESCAPE =27,
 SPACE =32,

boost::python::enum_as_int_converters<KEY> thekeys;

this_module.add(boost::python::to_python(TAB), "TAB");

--------------- compile error message

--------------------Configuration: Pussy - Win32 Release--------------------
D:\TigerVR\Code\Pussy\vr6.cpp(238) : error C2664: 'void __thiscall
boost::python::module_builder::add(class boost::python::detail::function
*,const char *)' : cannot convert parameter 1 from 'struct _object *' to
'class boost::python::detail::functi
on *'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.

vr6.obj - 1 error(s), 0 warning(s)



Boost list run by bdawes at, gregod at, cpdaniel at, john at