On Thu, Dec 12, 2013 at 12:54:58AM +0100, Gary Willoughby wrote: > On Wednesday, 11 December 2013 at 23:38:13 UTC, Adam D. Ruppe wrote: > >On Wednesday, 11 December 2013 at 23:35:04 UTC, Gary Willoughby > >wrote: > >> static union internalRep > > > > > >try > > > >static union InternalRep { /* note the capital letter */ > > /* snip */ > >} > >InternalRep internalRep;; // still need a decl > > Right. But why use the static keyword here?
Because nested structs by default carry a pointer to the containing struct (or scope), which means it adds extra baggage and you can't create the nested without also having an instance of the containing struct. T -- It is of the new things that men tire --- of fashions and proposals and improvements and change. It is the old things that startle and intoxicate. It is the old things that are young. -- G.K. Chesterton