Clang Project

clang_source_code/test/CXX/over/over.match/over.match.best/over.best.ics/over.ics.list/p6.cpp
1// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2
3// rdar://problem/11120365
4namespace test0 {
5  template <class T> struct A {
6    static void foo(const T &t) {}
7    static void foo(T &&t) {
8      t.foo(); // expected-error {{member reference base type 'int' is not a structure or union}}
9    }
10  }; 
11
12  void test() {
13    A<int>::foo({}); // expected-note {{requested here}}
14  }
15}
16