aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C
blob: aee27bc0c98cefa77abc075a77c7c0a188f57b33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile { target c++20 } }

template<class From, class To>
concept convertible_to = requires(From (&f)(), void (&g)(To)) { g(f()); };

template<class T>
concept Addable =
 requires(T x){
  {x + x} -> convertible_to<T>;
 };

int main(){
 Addable auto t = 0;
}