Explicit template instantiation and -fvisibility. Gcc bug?
Tue Nov 18 15:37:00 GMT 2008
On Tue, Nov 18, 2008 at 4:23 PM, Ian Lance Taylor <firstname.lastname@example.org> wrote:
> "Jeroen Wijnhout" <email@example.com> writes:
>> The cause seems to be the instantiation of
>> DependentTemplatedClass<TemplatedClass<int > >, which induces an
>> instantiation of TemplatedClass<int> as well. However I would expect
>> this instantiation to have public visibility as well, because the
>> DependentTemplatedClass instantiation is public. Is this a GCC bug, or
>> am I doing something wrong here?
> The semantics of how visibility should work with C++ classes and
> templates are obscure and probably still not fully pinned down. There
> has been work in each recent gcc release to address this in various
> ways. You neglected to mention which version of gcc you are using. I
> would recommend trying your program with mainline (the future gcc
> 4.4). If it does not behave as you expect, file a bug report (see
> http://gcc.gnu.org/bugs.html ). Thanks.
I am using GCC4.3.2 (most recent released version afaik), however I
will try the mainline version.
More information about the Gcc-help