summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/req16.C
blob: 2704c38bacb47fda6e4f480f9d61e842de4ab8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/66988
// { dg-options "-std=c++1z -fconcepts" }

#include <type_traits>

template <template <class> class T, class U>
concept bool _Valid = requires { typename T<U>; };

template <class T>
using __t = typename T::type;

template <class T>
struct __has_type : std::false_type { };

template <class T>
  requires _Valid<__t, T>
struct __has_type<T> : std::true_type { };

static_assert(!__has_type<int>(), "");