Debian Codegraph @

gcc/testsuite/g++.dg/concepts/pr91073-2.C

raw
1 // { dg-do compile { target c++17 } }
2 // { dg-options "-fconcepts" }
3
4 template<typename P, typename Arghhh = void>
5 concept one_or_two = true;
6
7 template<typename P>
8 concept one = one_or_two<P>;
9
10 template<typename T>
11 constexpr void
12 foo()
13 {
14 if (one<T>) // OK
15 { }
16
17 if (one_or_two<T>) // { dg-bogus "before" }
18 { }
19 }