summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/concepts/template-parm5.C
blob: 5e537b048ba243c2495dbfd176d52d466963cba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-options "-std=c++17 -fconcepts" }

template<typename T>
  concept bool C1 = __is_same_as(T, int);

template<int N>
  concept bool C2 = N == 0;

template<template<typename> class X>
  concept bool C3 = true;

template<typename> struct Foo;

template<C1... Ts = int> struct S1; // { dg-error "default argument" }
template<C1... = int> struct S2; // { dg-error "default argument" }
template<C2... Ns = 0> struct S3; // { dg-error "default argument" }
template<C2... = 0> struct S4; // { dg-error "default argument" }
template<C3... Ts = Foo> struct S5; // { dg-error "default argument" }
template<C3... = Foo> struct S6; // { dg-error "default argument" }