Home | History | Annotate | Download | only in temp.func.order
      1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
      2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
      3 // expected-no-diagnostics
      4 
      5 namespace OrderWithStaticMember {
      6   struct A {
      7     template<class T> int g(T**, int=0) { return 0; }
      8     template<class T> static int g(T*) { return 1; }
      9   };
     10   void f() {
     11     A a;
     12     int **p;
     13     a.g(p);
     14   }
     15 }
     16 
     17 #if __cplusplus >= 201103L
     18 namespace OperatorWithRefQualifier {
     19   struct A { };
     20   template<class T> struct B {
     21     template<class R> int &operator*(R&) &&;
     22   };
     23 
     24   template<class T, class R> float &operator*(T&&, R&);
     25   void test() {
     26     A a;
     27     B<A> b;
     28     float &ir = b * a;
     29     int &ir2 = B<A>() * a;
     30   }
     31 }
     32 
     33 namespace PR17075 {
     34   template <typename T> struct V {};
     35   struct S { template<typename T> S &operator>>(T &t) = delete; };
     36   template<typename T> S &operator>>(S &s, V<T> &v);
     37   void f(S s, V<int> v) { s >> v; }
     38 }
     39 #endif
     40