Construction Unions: A C++ Challenge
In this C++ Challenge, Herb Sutter throws down the gauntlet. Can you get around the C++ rule of using constructed objects as members of unions? Find out the answer in this sample chapter.
This chapter is from the book
No, this Item isn't about organizing carpenters and bricklayers. Rather, it's about deciding between what's cool and what's uncool, good motivations gone astray, and the consequences of subversive activities carried on under the covers. It's about getting around the C++ rule of using constructed objects as members of unions.
JG Questions
-
What are unions, and what purpose do they serve?
-
What kinds of types cannot be used as members of unions? Why do these limitations exist? Explain.
Page 1 of 3
Next >