Debian Codegraph @

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

raw
1 // PR c++/92633
2 // { dg-do compile { target c++20 } }
3
4 template<class A, class B>
5 concept different_than = !__is_same_as(A, B);
6
7 template<class B>
8 auto diff(B) {
9 return [](different_than<B> auto a) {};
10 }
11
12 int main() {
13 diff(42)("");
14 diff(42)(42); // { dg-error "no match" }
15 }