comparison gcc/testsuite/g++.dg/concepts/template-parm4.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // { dg-options "-std=c++17 -fconcepts" }
2
3 template<typename T>
4 concept bool C1 = __is_same_as(T, int);
5
6 template<int N>
7 concept bool C2 = N == 0;
8
9 template<template<typename> class X>
10 concept bool C3 = false;
11
12 template<typename> struct Foo;
13
14 template<C1... Ts> struct S1 { };
15 template<C2... Ns> struct S2 { };
16 template<C3... Xs> struct S3 { };
17
18 S1<int, int, bool> s1; // { dg-error "constraint failure|invalid type" }
19 S2<0, 1, 2> s2; // { dg-error "constraint failure|invalid type" }
20 S3<Foo> s3; // { dg-error "constraint failure|invalid type" }