[ub] type punning through congruent base class?

Jean-Marc Bourguet jm at bourguet.org
Mon Jan 6 17:17:36 CET 2014


On Mon, 6 Jan 2014 18:11:36 +0200, Ville Voutilainen
<ville.voutilainen at gmail.com> wrote:
> On 6 January 2014 17:34, Fabio Fracassi <f.fracassi at gmx.net> 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.

Yours,

-- 
Jean-Marc



More information about the ub mailing list