Path: csiph.com!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c++
Subject: Re: why use static_cast ?
Date: Sun, 20 Nov 2022 05:54:40 -0800
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <8635adbujj.fsf@linuxsc.com>
References: <035d8c85-23d2-451b-a387-855b369b4c12n@googlegroups.com> <87k04u1lq4.fsf@nosuchdomain.example.com> <86v8nfd7ri.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: reader01.eternal-september.org; posting-host="a724f5b4ee1d34e760f89c516bf20c9c"; logging-data="3707309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181mYY/Rgesrn+EQs6BAR4GGc6XwpzeIgQ="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:fnOzEMyoibYYOKy4vwd3jcZYyzU= sha1:N9wUnE84JNw7AjM6ErJpI3SiB70=
Xref: csiph.com comp.lang.c++:87488
Juha Nieminen writes:
> Tim Rentsch wrote:
>
>> Even so, clearly it was expected that unions would be used for
>> type punning,
>
> I'm not sure it's that evident.
>
> [...]
>
> I don't see how it's so obvious that 'union' was designed from the
> get-go with the intent of using it for type punning.
I didn't say anything about how the union construct was designed.
What I did say was that it was expected that unions would be used
for type punning, and that expectation was evident long before the
first C standard. It isn't relevant to what I was saying whether
unions were designed that way or not.