[C++-sig] Re: Making copy of function derived from C++ pure virtual function

David Abrahams dave at boost-consulting.com
Fri Dec 10 20:45:02 CET 2004


Paul F. Kunz wrote:
>>>>>> On Fri, 10 Dec 2004 07:38:12 -0800, "Paul F. Kunz" <Paul_Kunz at slac.stanford.edu> said:
> 
>>>>>> On Thu, 09 Dec 2004 20:37:18 -0500, David Abrahams <dave at boost-consulting.com> said:
>>> Sorry, this should be:
> 
>>> class_<FunctionWrap, std::auto_ptr<FunctionWrap> >( "FunctionBase",
>>> init<FunctionBase const&>())
> 
>> Ok, that compiles.  Obvious no that I see it.
> 
>> But now at run time I get...
> 
>    Replying to my own item, I got pass the runtime error by doing the
> following instead of the above...
> 
>       class_ < FunctionBase, std::auto_ptr< FunctionWrap> >
> 		( "FunctionBase" )

Don't do that; the code I suggested was there for a reason.  I think I
have a bug, but it will help a lot to have a test case.  Can you back up
a step to the previous version that compiled and make a reduced test
case for me to test my changes against?

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com




More information about the Cplusplus-sig mailing list