aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C
blob: b938d6535c781995c43b87452b2de16d44558051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/56291
// { dg-do compile { target c++11 } }

class Base
{
public:
 constexpr Base() : v(1) {};
 int v;
};

class Derived : public Base
{
public:
 constexpr Derived() : Base() {};
 virtual void function();
};

Derived d;