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

David Abrahams dave at boost-consulting.com
Wed Nov 20 02:24:59 CET 2002


David Abrahams <dave at boost-consulting.com> writes:

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

>> 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 ;-/

...and now it does. See the latest CVS.

We still desperately need someone to work on or fund better runtime
error messages.

-Dave
-- 
                       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