[C++-sig] Re: Possible bug with HeldType?
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Sat Aug 9 03:47:28 CEST 2003
>>>>> "DA" == David Abrahams <dave at boost-consulting.com> writes:
>> Anyway, from your response I understand that for classes with
>> virtual functions I need the add_wrapper function to use
>> std::auto_ptr<A_Wrapper> and not std::auto_ptr<A>.
DA> No, you can write
DA> implicitly_convertible<
DA> std::auto_ptr<A_Wrapper>, std::auto_ptr<A>
>> ();
Neat.
>> This is a bit of a pain with Pyste since if Nicodemus changes
>> the name of the wrapper class I'd have to change the pyste
>> files. Its easy to get things working now since I know how the
>> wrapper classes are named. Is there an alternative way to do
>> this that insulates the user from future changes to the wrapper
>> name?
DA> Not that I know of; I guess Nicodemus ought to do this
DA> implicitly_convertible trick himself.
DA> Hmm, Boost.Python could detect that case and do it for you.
That would be great. If not, I'll try and add the
implicitly_convertible trick to my 'holder' patch.
Thanks!
cheers,
prabhu
More information about the Cplusplus-sig
mailing list