Boost logo

Boost :

From: Eric van Riet Paap (eric_at_[hidden])
Date: 2001-03-16 10:51:51


Hi,

I'm new to boost, but have a small problem with this interesting piece of software.
I couldn't get the enum_as_int stuff working (possibly because I use serveicepack 3 with MSVC6),
so I decided to store the enums in ints myself (class member variables). However there were two more
things I tried to do, but couldn't get to work. First I tries a my_module.def_readonly(...) but it look like
only my_class.def_readonly(...) is supported (my question is: why?)
The second thing I tried was making the variables static to the class, like so:

class aclass
{
public:
 static int n;
}
aclass::n=123;
my_class.def_readonly(&aclass::n, "n");

However: I got this compiler message:

D:\TigerVR\Code\Pussy\vr6.cpp(232) : error C2784: 'void __thiscall boost::python::class_builder<class key,class boost::python::detail::held_instance<class key> >::def_readonly( key::*,const char *)' : could not deduce template argument for ' key::*' from 'int *'

Any way to do what I want?

Eric van Riet Paap, Utrecht, The Netherlands, Europe



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk