Jason Merrill <[EMAIL PROTECTED]> writes: > Gabriel Dos Reis wrote: > > Jason Merrill <[EMAIL PROTECTED]> writes: > > So, -concretely- what happens to a class S (e.g. associated type > > info object > > address, address of member functions, etc.) with external linkage, > > defined in multiple translation units, with say hidden visibility? > > If it has hidden visibility then shared objects other than the one > with the definition can't do much with it. They can use inline > interfaces and interfaces that are explicitly overridden to have > default visibility. > > Anything that relies on weak symbols to unify vague linkage entities > across shared objects will break.
I don't think "break" is the right word here. It will behave exactly as documented. If you were expecting the two classes to be the same, then you'll find won't be, but this is not breakage, it is a fault of your expectation---and remember, we have a perfectly good way to make sure that the classes *are* the same, which is to give the classes default visibility.