[Top][All Lists]

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

Re: Question on explicit template expansion

From: Nathan Sidwell
Subject: Re: Question on explicit template expansion
Date: Tue, 17 May 2005 16:25:29 +0100
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

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();
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 Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
address@hidden    ::     http://www.planetfall.pwp.blueyonder.co.uk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]