C++ Logo


Advanced search

Subject: Re: [ub] type punning through congruent base class?
From: Jean-Marc Bourguet (jm_at_[hidden])
Date: 2014-01-06 10:17:36

On Mon, 6 Jan 2014 18:11:36 +0200, Ville Voutilainen
<ville.voutilainen_at_[hidden]> wrote:
> On 6 January 2014 17:34, Fabio Fracassi <f.fracassi_at_[hidden]> wrote:
>> It would enable us to extend or change the interface of a class without
>> copying or moving the underlying object (think mixin without additional data).
> Why don't you just construct D with a B&?

The only reason I can think is to access protected members, but I'll
argue that's
a good reason not to allow that.



SG12 list run by sg12-owner@lists.isocpp.org