summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/enum11.C
blob: f15b6cda49bddae9853942bfd1b9896663f82e7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/48969
// { dg-do compile { target c++11 } }
// { dg-options "-ftemplate-depth=10" }

template<unsigned int N> struct Pair { };
struct Foo { enum { Mask = 1 }; } foo;
template<typename A, typename B> class Pair<A::Mask | B::Mask> // { dg-error "depth" }
operator|(const A &, const B &)
{ }

Pair<Foo::Mask> f = foo|foo;	// { dg-message "from here" }

// { dg-prune-output "compilation terminated" }