Gabriel Dos Reis wrote:
Tristan Wibberley <[EMAIL PROTECTED]> writes:
| Mike Stump wrote:
| > On Jul 12, 2006, at 11:49 AM, Tristan Wibberley wrote:
| >> "the client code needs to know about the existence of this type so
| >> it can get pointers and references to instances and pass them back
| >> in later and maybe be able to call virtual member functions and
| >> access non-static members" by putting it in a header which they
| >> document should be included by client code - thus client code
| >> includes it and knows about the type.
| > And what do you expect the type equality operator return for two
| > types called S?
|
| I don't expect two types called S
*you* probably don't. The C++ compiler does.
| - I don't recall suggesting that
| multiple types with the same name should be able to exist.
then you have to consider that suggestion and come with an answer.
I don't see why. The point is that visibility is orthogonal to linkage;
a class S with external linkage is still required by the ODR to be
unique across multiple shared objects even if some of the symbols that
refer to it can't be referenced from outside their defining object. The
visibility restrictions place practical limits on how other objects can
use the type, but that doesn't mean it isn't the same type.
Jason