aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
blob: eac6004aeb35ac67be0c41d0d93f073adddb2e9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/59268
// { dg-do compile }
// { dg-options "-std=c++11" }

template <typename>
struct A
{
  constexpr A (int) {}
  virtual void foo ()
  {
    constexpr A<void> a (0);
  }
};

void
bar ()
{
  A<int> a (3);
  a.foo ();
}