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

template <class T, class U>
concept Same = __is_same_as(T, U);

template <class T>
concept C = requires (T t) {	// { dg-error "invalid parameter|in requirements" }
    requires Same<decltype(t),void>;
  };

template <typename T>
  requires C<T>
constexpr bool is_c() { return true; }

static_assert(is_c<void>(), ""); // { dg-error "" }