What does Clang's 'type_visibility' attribute do, and when should one use it?
It is used in libc++ on many template types such as tuple_element , tuple , etc. As far as I can tell there is no public documentation of what it does other than the commit message introducing it and this unit test in the clang project. This attribute allows the ELF visibility of a type and (presumably) its vague linkage objects (vtable, typeinfos) to be controlled separately from the visibility of functions and data members of the type. This allows typeinfos and the vtable for, say, explicit instantiations of a templated polymorphic type to be located centrally without forcing default