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
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
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