| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
| 2 |
|
| 3 |
namespace redecl_in_templ { |
| 4 |
template<typename T> void redecl_in_templ() { |
| 5 |
extern void func_1(); // expected-note {{previous declaration is here}} |
| 6 |
extern int func_1(); // expected-error {{functions that differ only in their return type cannot be overloaded}} |
| 7 |
} |
| 8 |
|
| 9 |
void g(); |
| 10 |
constexpr void (*p)() = g; |
| 11 |
|
| 12 |
template<bool> struct X {}; |
| 13 |
template<> struct X<true> { typedef int type; }; |
| 14 |
|
| 15 |
template<typename T> void f() { |
| 16 |
extern void g(); |
| 17 |
X<&g == p>::type n; |
| 18 |
} |
| 19 |
} |