Boost logo

Boost :

From: Eric van Riet Paap (eric_at_[hidden])
Date: 2001-03-19 17:55:45

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