brintos

brintos / llvm-project-archived public Read only

0
0
Text · 456 B · cfcf00b Raw
27 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4template <class F1> int foo1(F1 X1);5 6template <int A1> struct A {7  template <class F2> friend int foo1(F2 X2) {8    return A1;9  }10};11 12template struct A<1>;13int main() { 14  foo1(1.0);15}16 17template <class F1> int foo2(F1 X1);18 19template <int A1> struct B {20  template <class F2> friend int foo2(F2 X2) {21    return A1;22  }23};24 25template struct B<1>;26template int foo2<float>(float X1);27