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

struct C {
  constexpr virtual bool foo () const = 0;
};
struct A : public C {};
struct B : public C {};
template <int>
struct D : A, B
{
  constexpr bool foo () const override { return true; }
};
constexpr D<0> d;
static_assert (d.foo (), "");