view gcc/testsuite/g++.dg/torture/pr41183.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/41183
// { dg-do compile }

void foo (const char *);

template <int *>
struct A
{
  template <typename T> A (const int &, T);
  int i;
};

template <int *X>
template <typename T>
A<X>::A (const int &j, T) : i(j)
{
  foo (0);
  foo (0);
  foo (__PRETTY_FUNCTION__);
}

int N;

struct B
{
  B ();
  A<&N> a;
};

B::B() : a(N, 0) {}