aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C
blob: 46bc759fdf2e0ccf5cc8ff92b743c388acdde229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// { dg-do compile { target c++20 } }
// { dg-additional-options "-fconcepts" }

namespace zero
{
  template<int... s>
  struct S
  {
    template<int... f>
      requires(... and (s == f))
    static void F()
    {
    }
  };

  void foo(S<>) {}
}

namespace one
{
  template<typename X, typename Y> concept Foo = true;

  template<typename... T>
  struct foo
  {
    template<typename... U>
    foo(U...)
      requires (Foo<T, U> && ...)
    {}
  };

  void bar(foo<int, long, double>) {}
}