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

template<class T>
struct A { // { dg-error "destructor for 'A<int>' is ambiguous" }
  ~A() requires true;
  ~A() requires (!!true);
};

A<int> a;

template<class T>
struct B { // { dg-error "no viable destructor for 'B<int>'" }
  ~B() requires false;
  ~B() requires (!!false);
};

B<int> b;