C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Anonymous unions with non-trivial member types
From: Thiago Macieira (thiago_at_[hidden])
Date: 2020-08-29 10:26:53


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

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups