aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/req8.C
blob: 5a34358bbd5528872b19b41796929c179bb92d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile }
// { dg-options "-std=c++17 -fconcepts" }

// Check that type requirements are normalized correctly.

template<typename T>
  concept bool Has_member_type() {
    return requires() { typename T::type; };
  }

template<typename T>
  concept bool Concept() {
    return true && Has_member_type<T>();
  }

template<Concept T>
  void foo( T t  ) { }