C++ Logo

sg12

Advanced search

Re: [ub] Type punning to avoid copying

From: Jeffrey Yasskin <jyasskin_at_[hidden]>
Date: Fri, 26 Jul 2013 08:45:29 -0700
On Fri, Jul 26, 2013 at 8:30 AM, Gabriel Dos Reis <gdr_at_[hidden]> wrote:
> Ion Gazta˝aga <igaztanaga_at_[hidden]> writes:
>
> [...]
>
> | ┐How can we tell the compiler that a memory buffer is really a different
> | type?
>
> Invoke a constructor to turn the raw memory into an object of the
> desired type.

Can you point to the wording that explains the behavior in that case?

Received on 2013-07-26 17:45:51