aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec12a.C
blob: 6d23a28892dda1587e72b2c13b502f0b3a007b65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/96363
// { dg-do compile { target c++20 } }
// A version of concepts-partial-spec12.C where the primary template is
// constrained.

template<class T> concept C = true;

template<C T> class TPL;

template<C T> requires true  class TPL<T>;   // #1
template<C T> requires false class TPL<T>;   // #2 error here

template<C T> requires true  class TPL<T*>;  // #1
template<C T> requires false class TPL<T*>;  // #2 error here