Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-alias6.C

raw
1 // Verify we can check satisfaction of a non-dependent member alias
2 // template-id whose constraints don't depend on outer template
3 // parameters ahead of time.
4 // { dg-do compile { target c++20 } }
5
6 template<class T>
7 struct A {
8 template<int N> requires (N > 0)
9 using at = T;
10
11 void f() {
12 using ty1 = at<0>; // { dg-error "constraint" }
13 using ty2 = at<1>;
14 }
15 };