Debian Codegraph @

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

raw
1 // { dg-do compile { target c++20 } }
2
3 template<class From, class To>
4 concept convertible_to = requires(From (&f)(), void (&g)(To)) { g(f()); };
5
6 template<class T>
7 concept Addable =
8 requires(T x){
9 {x + x} -> convertible_to<T>;
10 };
11
12 int main(){
13 Addable auto t = 0;
14 }