C++ Logo

SG12

Advanced search

Subject: Re: [ub] type punning through congruent base class?
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2014-01-16 16:42:06


| (I concur with your earlier point that the C++ wording 3.8p1
| "storage with the proper alignment and size for type T is obtained"
| isn't good enough, and we might need something akin to the
| C model of effective type, or apply the term "dynamic type"
| expressly for the memory-scribbling case.)

I am unconvinced by the notion of the effective type and I see no reason to deviate from "dynamic type".
On the other hand, we definitely need to define more cases -- see for example my earlier that suggested to consider certain uses of memcpy() as having the moral semantics of constructor call -- matching C's transfer of effective type.

-- Gaby
 


SG12 list run by herb.sutter at gmail.com