Re: Question on explicit template expansion

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

 



Garrett Kajmowicz wrote:

The attached test case comes with a Makefile. Type make and watch the warning message occur. Note that the warning messages occur only for the constructor and destructor, and not for the other method.

header.h contains #ifndef __EXPAND_LIBRARY_FOR_COMPILE__ template <> myclass<char>::myclass(); template <> myclass<char>::~myclass(); template <> void myclass<char>::method(); #endif these *declare* specializations of the myclass ctor,dtor and method. There's no reason to make them NOT visible when compiling the library.

However, it does appear to be a g++ bug in that the inline attribute is
copied from the general template to the specialization.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk


[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