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

template <class T, class U>
concept C = requires (T t, U u) { t + u; };

template <class T, class U>
  requires C<T,U>
void f(T t, U u) { t + u; }

struct non_addable { };

int main()
{
  using T = decltype(f(42, 24));
}