* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
[official-gcc.git] / gcc / testsuite / g++.dg / concepts / template-parm2.C
blob6a32cfee88530fea46af45d5128cee98c454a84c
1 // { dg-options "-std=c++17 -fconcepts" }
3 template<typename T>
4   concept bool C1 = __is_same_as(T, int);
6 template<int N>
7   concept bool C2 = N == 0;
9 template<template<typename> class X>
10   concept bool C3 = false;
12 template<typename> struct Foo;
14 // Instantiation of default arguments happens at the point of
15 // instantiation for the class.
17 template<C1 T = char> struct S1 { };
18 template<C2 N = 1> struct S2 { };
19 template<C3 X = Foo> struct S3 { };
21 S1<> s1; // { dg-error "constraint failure|invalid type" }
22 S2<> s2; // { dg-error "constraint failure|invalid type" }
23 S3<> s3; // { dg-error "constraint failure|invalid type" }