[cfe-dev] Friend functions default parameters behavior

Sylvestre Ledru sylvestre at debian.org
Thu Jul 24 10:26:09 PDT 2014

On 24/07/2014 03:44, Nikola Smiljanic wrote:
> This is taken from clang source at the point where the error is emitted:
> // C++11 [dcl.fct.default]p4: If a friend declaration specifies a
> // default argument expression, that declaration shall be a definition
> // and shall be the only declaration of the function or function
> // template in the translation unit.
> Not sure how wide spread this construct is, I'm seeing it for the
> first time. The code is not hard to fix and error seems appropriate to me.
It is in the top 10 of the build failure in the Debian rebuilds. So, it
is not uncommon.
Should we report a bug on gcc to have it more strict here? (or is it
"only" C++11)


More information about the cfe-dev mailing list