aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/decltype-overloaded-functions.cpp
blob: f1b29b0864399407a0535b358d4e7cb17fa766af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x

void f();
void f(int);
decltype(f) a; // expected-error{{cannot determine the type of an overloaded function}}

template<typename T> struct S {
  decltype(T::f) * f; // expected-error{{cannot determine the type of an overloaded function}}
};

struct K { void f(); void f(int); };
S<K> b; // expected-note{{in instantiation of template class 'S<K>' requested here}}