#313 Given the following in C++
Uncategorized
2
Posts
2
Posters
4
Views
-
#313 Given the following in C++
static union {
int x;
}; // Well-formed?Without checking:
A. Yes
B. No -
#313 Given the following in C++
static union {
int x;
}; // Well-formed?Without checking:
A. Yes
B. No@shafik Are we worried about having a union with a single member? Or is there something else I missed?
Had to look it up. Single-member unions are perfectly legal.
What I didn't know is unions can also have methods, including constructors.
-
R relay@relay.mycrowd.ca shared this topic