[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr69091.C
blobec7bb25691246382b9a51c17da405e56206de2b7
1 // PR c++/69091
2 // { dg-do compile { target c++14 } }
4 template <class ValueType, ValueType>
5 struct Option {};
7 template <class ValueType, ValueType Value, class OptionsRhs>
8 auto operator|(Option<ValueType, Value>, OptionsRhs) {
9   return Value;
12 enum canine_t { no, yes };
13 Option<canine_t, no> cat;
14 Option<canine_t, yes> dog;
16 template <class T>
17 void f(T) {
18   cat | dog;
21 struct A {};
22 int main() {
23   f(A{});
24   return 0;