brintos

brintos / llvm-project-archived public Read only

0
0
Text · 399 B · 7bc5f13 Raw
16 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2template<typename T>3void f(T);4 5template<typename T>6struct A {7  // expected-error@+1{{cannot declare an explicit specialization in a friend}}8  template <> friend void f<>(int) {}9};10 11// Makes sure implicit instantiation here does not trigger12// the assertion "Member specialization must be an explicit specialization"13void foo(void) {14    A<int> a;15}16