summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/crash16.C
blob: f80dd10644c557d580903cf2919dec585f6e0a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// { dg-do compile }
 
// Origin: Alexander Stippler  <stip@mathematik.uni-ulm.de>
// PR c++/10079

template <bool> struct A {};

template <typename> struct B
{
  enum { e };
};

template <typename T> A<(B<T>::e && 0)> foo(T) {}

template <typename T> void foo(B<T>) {}

void bar()
{
  B<int> b;
  foo(b);
}