Boost logo

Boost Users :

Subject: Re: [Boost-users] [exception] exception_ptr missing virtual base parameters
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-04-11 11:17:49


AMDG

On 04/10/2013 11:04 PM, Michael Caisse wrote:
> The basic problem I'm experiencing is that getting an exception_ptr
> results inherited parameters getting lost when virtual inheritance is used.
>
> The code below demonstrates a simple example. "bar" is lost in the
> print. Changing derived_except to be:
>
> struct derived_except : base_except
> { int i; };
>
> will cause the inherited values to be copied into the exception_ptr;
> however, this has all the standard problems associated that come with
> not using virtual inheritance.
>
> This looks like a bug to me. The C++11 equivalent behaves has expected
> and inherited values are maintained in the exception_ptr. Any thoughts?
>

The only way to make it work is to
restructure clone_impl to use the compiler
generated copy constructor.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net