[cfe-dev] Friend functions default parameters behavior

Joerg Sonnenberger joerg at britannica.bec.de
Thu Jul 24 15:38:26 PDT 2014


On Wed, Jul 23, 2014 at 03:48:49PM +0400, Александр Овчинников wrote:
> Even if clang seems to follow the C++ specification, I wonder if clang is
> not too strict here.
> For example, this patch, to make sure that the code compiles with clang, I
> had to basically get ride of the default feature:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=gfan.diff;att=1;bug=755308
> to be able to compile the code with clang without touching the API.

The default argument should be on the original definition, not the
friend. I have fixed the cases I have seen in pkgsrc and mostly
submitted patches upstream, e.g. for Blender.

Joerg



More information about the cfe-dev mailing list