HowardHinnant.github.io icon indicating copy to clipboard operation
HowardHinnant.github.io copied to clipboard

TypeHiearchy.pdf is missing an edge from union to class

Open zygoloid opened this issue 6 years ago • 1 comments

A union is a kind of class, so there should be a line from union to class in TypeHierarchy.pdf.

(Otherwise this is an excellent and incredibly useful resource! Would you have any interest in contributing it to the standard?)

zygoloid avatar Nov 08 '19 16:11 zygoloid

I'd be happy to contribute it to the standard. But you may not want it after my response. :-)

I should make this chart more clear that it models the primary and composite type_traits ([meta.unary.cat] and [meta.unary.comp] respectively). Here there is no such relationship between union and class.

This was an intentional deviation from [basic.types] for C++11 justified by the practical needs of the clients of <type_traits>.

That being said, if anyone wants to create a derivative work from this that depicts [basic.types], I don't mind at all.

HowardHinnant avatar Nov 08 '19 16:11 HowardHinnant