Clang Project

clang_source_code/test/SemaCXX/template-ambiguous-overload.cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3namespace n {
4template <int>
5void f(); // expected-note{{explicit instantiation candidate function 'n::f<0>' template here [with $0 = 0]}}
6
7extern template void f<0>();
8}
9
10using namespace n;
11
12template <int>
13void f() {} // expected-note{{explicit instantiation candidate function 'f<0>' template here [with $0 = 0]}}
14
15template void f<0>(); // expected-error{{partial ordering for explicit instantiation of 'f' is ambiguous}}
16
17