p3-0x.cpp revision 762bb9d0ad20320b9f97a841dce57ba5e8e48b07
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2
3namespace PR6285 {
4  template<typename T> struct identity
5  { typedef T type; };
6
7  struct D {
8    template<typename T = short>
9    operator typename identity<T>::type(); // expected-note{{candidate}}
10  };
11
12  int f() { return D(); } // expected-error{{no viable conversion}}
13}
14
15