Home

Hendrik Schober wrote:
> Hi,
>
> this piece of code
>
> namespace {
> template< typename T >
> struct X {};
>
> template< typename T >
> struct Y {};
> }
>
> namespace gaga {
> struct Z : public Y< X<int> > {};
> }
>
> int main()
> {
> gaga::Z z;
> return 0;
> }
>
> (which I didn't bother trying to simplify further) causes
> some build of GCC 4.1.2 to emit the following warning:
> 'gaga::Z' has a base '<unnamed>::Y<<unnamed>::X<int> >' whose type
> uses the anonymous namespace Has anyone out there any idea what GCC
> ist trying to tell us?

'Z' nas external linkage, so it should be accessible from another
module. However, it derives from classes that are not accessible
from another module (since they are in the anonymous namespace).
Perhaps it has something to do with that...

If not, please ask in the newsgroup dedicated to GCC or in their
online discussion forums.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask

previous
next

Re: Put a stl container in private or public?
Sip4.7
Re: C++ Feature Help
Re: I don't want this anymore
saving "this" in base class
paraprotex
paraprotex
paraprotex
paraprotex
paraprotex