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

// Redefinition errors.

template<typename T>
  concept bool C() { return __is_class(T); }

template<typename T>
  concept bool D() { return C<T>() and __is_empty(T); }

template<C T> void f(T x) { }
template<typename T>
  requires C<T>()
    void f(T x) { } // { dg-error "redefinition" }

int main() { }