Visibility of C++ class private symbols (as compared to static)
Thu Oct 3 15:35:00 GMT 2002
On Wed, 2 Oct 2002, Vivenzio Pagliari wrote:
> In theory, class Foo could be implemented in different compilation
> units and thus require external linkage of the symbols. Even more,
> the resulting object code could be split up in different libraries
> (eg. Foo::bar(int) in libfoo1.so and Foo::s_ in libfoo2.so),
> requiring eg. the entries in the dynamic symbol table.
> But who does this or who needs this??
I suspect nobody does and nobody should, but to change the compiler so
that it didn't would make it non-standard. (I can imagine one place where
I would use that feature, suppose some of the class implementation is
crafted by hand, some of it generated.)
Conversely it shouldn't ever be a problem to you unless you are getting
name space conflicts. At which point you should start using the namespace
feature of the standard anyway.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : firstname.lastname@example.org
Ruby - http://www.ruby-lang-org - The best of perl,python,scheme without the pain.
Valgrind - http://developer.kde.org/~sewardj/ - memory debugger for x86-GNU/Linux
Free your books - http://www.bookcrossing.com
More information about the Gcc-help