aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp
blob: 9dd683261ed0ce01d01abe5ac6b36f14e5362784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s

// Core DR 532.
namespace PR8130 {
  struct A { };

  template<class T> struct B {
    template<class R> int &operator*(R&);
  };

  template<class T, class R> float &operator*(T&, R&);
  void test() {
    A a;
    B<A> b;
    int &ir = b * a;
  }
}

namespace OrderWithStaticMember {
  struct A {
    template<class T> int g(T**, int=0) { return 0; }
    template<class T> static int g(T*) { return 1; }
  };
  void f() {
    A a;
    int **p;
    a.g(p);
  }
}