Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // { dg-do compile { target c++2a } } | |
2 | |
3 template<typename T> | |
4 concept C = __is_class(T); | |
5 | |
6 template<const C T> struct S1 { }; // { dg-error "cv-qualified" } | |
7 template<volatile C T> struct S2 { }; // { dg-error "cv-qualified" } | |
8 template<C* T> struct S3 { }; // { dg-error "invalid" } | |
9 template<C const* T> struct S3a { }; // { dg-error "invalid" } | |
10 template<C* const T> struct S3b { }; // { dg-error "invalid" } | |
11 template<C& T> struct S4 { }; // { dg-error "invalid" } | |
12 template<C[3] T> struct S4 { }; // { dg-error "invalid|expected" } | |
13 template<C(*T)()> struct S5 { }; // { dg-error "invalid" } |