Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C

raw
1 // PR c++/67225
2 // { dg-do compile { target c++20 } }
3 // { dg-additional-options "-fconcepts" }
4
5 template <class, class>
6 concept C1 = true;
7
8 template <class>
9 concept C2 = requires { { 42 } -> C1<int>; };
10
11 int main() {
12 class A { int x; } a;
13 a.x = 42; // { dg-error "private within this context" }
14 }