Re: [PATCH] D19336: Repair redeclaration chain of friend template functions.

2016-04-25 Thread Serge Pavlov via cfe-commits
2016-04-21 2:57 GMT+06:00 Richard Smith : > rsmith added a comment. > > Sorry, I don't think this approach can work. Consider: > > template struct X { > template friend void f(T); > template friend void f(U); > }; > > These two friend declarations declare different friend function temp

Re: [PATCH] D19336: Repair redeclaration chain of friend template functions.

2016-04-20 Thread Richard Smith via cfe-commits
rsmith added a comment. Sorry, I don't think this approach can work. Consider: template struct X { template friend void f(T); template friend void f(U); }; These two friend declarations declare different friend function templates, but this transformation would incorrectly make them

[PATCH] D19336: Repair redeclaration chain of friend template functions.

2016-04-20 Thread Serge Pavlov via cfe-commits
sepavloff created this revision. sepavloff added a reviewer: rsmith. sepavloff added a subscriber: cfe-commits. When friend template function is parsed, it obtains wrong type. For instance, in the code: template void func(T1 *x); template struct C1 { template void func(T1 *x); }; the friend