Gabriel Dos Reis wrote:
Tristan Wibberley <[EMAIL PROTECTED]> writes:
[...]
| I am suggesting that visibility attributes should *not* touch the C++
| type system in any way.
But then, at the same time you're talking of polymorphic types
(e.g. vtables).
vtables happen to just work with types whose associated symbols are not
exported from a shared object - as long as you are not trying to
construct an instance from outside the shared object. So you can call a
function that *is* exported and get a pointer to a type that you know
(from an included header) has some virtual functions that you can lookup
with an offset relative to the pointer to the instance (an offset
calculated at compile time). Thus not requiring any change in the C++
type system - nor any propagation to infer new access controls on members.
| Since C++ doesn't have a notion of module a
| class that the C++ type system regards as hidden must be hidden from
| everything (in which case, you could just comment out the class
| definition instead) or nothing.
That brings us back to Mike's question. We are not making progress.
| I suggest that should be nothing, and
| that the linker should apply the visibility attributes to *its* notion
| of module.
Please elaborate.
I've sent another email in reply elsewhere with a list of the three
visibility concepts that I've seen (which are all mostly orthogonal).
Which hopefully will make sure I'm talking about the same things as you are.
--
Tristan Wibberley
These opinions are my own, and do not reflect those of my employer.