[C++-sig] Re: Re: debuging

David Abrahams dave at boost-consulting.com
Wed Nov 20 00:05:13 CET 2002

"Mike Rovner" <mike at bindkey.com> writes:

> Nope. One module.
> (strarring..........................................................;)
> I vaguly recall that probably one error was fixed in cvs regarding that.
> I have
> struct  X {
>     std::string Name() { return name;}
> private:
>     std::string name;
> };
> struct Obj : X { ... };
> class_<Obj>("Obj").add_property("name", &Obj::Name);
> and in that case I have to cast Obj::Name to something as workaround. Can't
> find it. :(

Yeah, you either need to expose X and make it a base of Obj, or cast:

      (std::string (Obj::*)())&Obj::Name

> But I have several such places and wondered about generic technique.

I think Boost.Python should handle this for you, though ;-/

>> BTW: It would be nice if Boost.Python gave a more specific error message
> as it
>> did in version 1, but then there is to problem with gcc's (and other
>> compilers?) mangled names. We need a volunteer with enough time to address
> this
>> issue...
> What is the problem? Write the demangler? Can you explain it a
> little, please?

That's part of it. See:


Of course, we also need some code to build error messages...

                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

More information about the Cplusplus-sig mailing list