aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/nontype13.C
blob: d604da9445416b6d87e71a7e3e0b7c04b3657694 (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
// PR c++/19004

template<typename T>
struct Dummy
{
  void evil()
  {
    this->template tester<true>();
  }
      
  template<bool B>
  void tester()
  {
    bar<evil>()(); // { dg-error "constant|template" }
  }
  template<bool B>
  struct bar
  {
    void operator()()
    { }
  };
};

int main()
{
  Dummy<int> d;
  d.tester<true> (); // { dg-message "required" }
}