Non-template-friend warning.

Jacek Generowicz jmg@ecs.soton.ac.uk
Wed Feb 14 04:33:00 GMT 2001


When compiling C++ code one may get warnings of the type:

  warning: friend declaration ` ****** '
  warning:   declares a non-template function
  warning:   (if this is not what you intended, make sure
  warning:   the function template has already been declared,
  warning:   and add <> after the function name here)
  warning:   -Wno-non-template-friend disables this warning.

Is there a way of signalling that, in a particular case, the
non-template nature of the friend is intended ?  In other words, can
the warning be suppressed for SPECIFIC cases rather than
indiscriminantly ?

Thanks,

Jacek



More information about the Gcc mailing list