gcc/testsuite/g++.dg/concepts/pr94827.C
raw| 1 | // PR 94287 ICE looking inside open template-parm level |
| 2 | // { dg-do run { target c++17 } } |
| 3 | // { dg-options -fconcepts } |
| 4 | |
| 5 | template <typename T, |
| 6 | bool X = requires { requires (sizeof(T)==1); } > |
| 7 | int foo(T) { return X; } |
| 8 | |
| 9 | int main() { |
| 10 | if (!foo('4')) |
| 11 | return 1; |
| 12 | if (foo (4)) |
| 13 | return 2; |
| 14 | return 0; |
| 15 | } |