C++ Logo


Advanced search

Re: [ub] type punning through congruent base class?

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Thu, 16 Jan 2014 22:42:06 +0000
| (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

Received on 2014-01-16 23:42:16