aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-ctad3.C
blob: 3546b7461a84d3afade66c2efd029963703c6cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/97679
// { dg-do compile { target c++20 } }

template <bool V> struct A {
  template <class T> struct B {
    B(T) requires V;
    template <class U> B(T, U) requires V || (__is_same(T, char) && __is_same(U, int));
  };
};

A<true>::B x1(0);
A<false>::B x2(0); // { dg-error "deduction|no match" }

A<true>::B y1(0, '0');
A<false>::B y2(0, '0'); // { dg-error "deduction|no match" }
A<false>::B y3('0', 0);