summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/sfinae3.C
blob: 5799a364e4253d74c77a7fd3a58fbb9bd9ab54c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/24671
// { dg-options "" }

template<typename> struct A
{
  typedef int X;
  static const int i = 0;
};

template<typename> struct B
{
  B(const B&); // { dg-message "candidate" }
  typedef typename A<char[A<B>::i]>::X Y;
  template<typename T> B(T, Y); // { dg-error "call" }
};

B<int> b(0,0);