Re: [c++0x] =default on template class virtual destructor fails to link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Simon Hill <yacwroy@xxxxxxxxx> writes:

> In the code below, in CFoo's class definition I declare CFoo's
> destructor as virtual.
> I then externally define CFoo's destructor.
> If I define it using {} it compiles fine.
> However, if I use =default, it fails to generate the object code for
> CFoo::~CFoo() and I get a link error.
> Shouldn't these two definitions be identical (except form {} making
> CFoo non-POD).
> The compiler recognizes the need to generate ~CFoo<type> if
> ~CBar<type> is called, as is demonstrated by using {}.
> Is this a bug?
> It would suck if this isn't a bug, as this would mean =default
> couldn't be used on any template virtual destructors.

This looks like a bug to me.  The C++0x support in gcc is quite now.  I
encourage you to file a bug, per http://gcc.gnu.org/bugs.html .  Thanks.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux