Apart from the usual retrictions in C++ i.e. no static variables (in
unions), no virtual member functions (in unions), no overloading the =
operator, there is no direct reference in Herb Schildt's manual to any
"upper bound".
Try it yourself and see what happens
Andrew Curzon (UK, C++ Programmer)
"Gianni Mariani" <gi2nospam@mari ani.ws> wrote in message
news:bihmr9$e3p @dispatch.conce ntric.net...[color=blue]
> Luca wrote:[color=green]
> > do you know if there is some upper bound on the number of members that
> > can be contained in a union?[/color]
>
> Why do you ask ?
>
> It's probably implementation dependant.
>[/color]
"Andew Curzon" <andrew.curzon1 @ntlworld.com> wrote in message news:FA05b.158$ 4v4.130800@news fep1-win.server.ntli .net...[color=blue]
> Apart from the usual retrictions in C++ i.e. no static variables (in
> unions), no virtual member functions (in unions), no overloading the =
> operator, there is no direct reference in Herb Schildt's manual to any
> "upper bound".[/color]
Fortunately nobody implements a compiler to Schildt's recommendations .
The standard doesn't require that there be either a maximum or minimum
number of union elements supported, but suggests 4096 as the minimum
the implementation su pport.
Comment