C++ Logo


Advanced search

Re: Anonymous unions with non-trivial member types

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sat, 29 Aug 2020 08:26:53 -0700
On Saturday, 29 August 2020 04:34:06 PDT Yongwei Wu via Std-Discussion wrote:
> What is the most correct way to write what I intended? Or maybe
> constructors are the correct choice here? (Anyway, knowing the trouble is
> only caused by the aggregate initialization, I am not that bothered now.)

That one is easy: give the union a name.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-08-29 10:30:25