Which cannot be implemented without compiler hooks?
I have written up a complete answer here — it’s a work in progress, so I’m giving the authoritative hyperlink even though I’m cutting-and-pasting the text into this answer. Also see libc++’s documentation on Type traits intrinsic design. is_union is_union queries an attribute of the class that isn’t exposed through any other means; in C++, … Read more