Re: How to issue a warning if a C++ template is defined as 'inline' or 'static'

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

 




- 'inline' just makes the template function more likely to be
inlined, but it is not required in a header file, like it is
usually required for normal functions in order to prevent
redefinition errors.

Right

Isn't it more precise to say, it's not needed inside a class or struct
definition?  If you have a free method in a header file you still need
to declare it to be inline, to avoid redefinition issues.

In my experience, 'inline' is needed for a free function in a header file, but not for a C++ template.

Inside 'class' or 'struct', 'inline' is kind of implicit.



[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