summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/variadic1.C
blob: 8129463ae785b739a19dff51e1cb49529042e521 (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
// PR c++/66712
// { dg-options "-std=c++1z -fconcepts" }

template <class T, class...Args>
concept bool _Constructible_ =
  requires (Args&&...args)
  {
    T{ ((Args&&)(args))... };
  };

template <class T, class...Args>
constexpr bool _constructible_() { return false; }

_Constructible_{T, ...Args}
constexpr bool _constructible_() { return true; }

struct S
{
  S(int, char const *);
};

int main()
{
  static_assert(_constructible_<S, int, char const *>(), "");
}