llvm-project/clang/test/CXX/dcl.decl
Serge Pavlov 79271ab154 Do not inherit default arguments for friend function in class template.
A function declared in a friend declaration may have declarations prior
to the containing class definition. If such declaration defines default
argument, the friend function declaration inherits them. This behavior
causes problems if the class where the friend is declared is a template:
during the class instantiation the friend function looks like if it had
default arguments, so error is triggered.

With this change friend functions declared in class templates do not
inherit default arguments. Actual set of them will be defined at the
point where the containing class is instantiated.

This change fixes PR12724.

Differential Revision: https://reviews.llvm.org/D30393

llvm-svn: 304965
2017-06-08 06:31:19 +00:00
..
dcl.decomp [c++1z] P0217R3: Allow by-value structured binding of arrays. 2016-12-14 03:22:16 +00:00
dcl.fct.def Implement the likely resolution of core issue 253. 2016-02-19 01:52:46 +00:00
dcl.init [Sema] Add lvalue-to-rvalue cast in direct-list-initialization of enum 2017-02-16 01:20:00 +00:00
dcl.meaning Do not inherit default arguments for friend function in class template. 2017-06-08 06:31:19 +00:00
dcl.name
p4-0x.cpp