// PR c++/48969 // { dg-do compile { target c++11 } } // { dg-options "-ftemplate-depth=10" } template struct Pair { }; struct Foo { enum { Mask = 1 }; } foo; template class Pair // { dg-error "depth" } operator|(const A &, const B &) { } Pair f = foo|foo; // { dg-message "from here" } // { dg-prune-output "compilation terminated" }