This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fobey-inline (was Re: gcc and inlining)


On Tue, Mar 18, 2003 at 07:18:30AM +1200, Ross Smith wrote:
> The vast majority of inline functions in modern C++ are templates. 
> Templates _have_ to be inline, either defined inside a class definition 
> or explicitly marked inline if they're defined out of line or aren't 
> class members. There's no portable way to use templates without marking 
> them inline.

This is not correct.  The template has to appear in the header; it need
not be declared inline.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]