summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr41183.C
blob: df3e303410e72c9dfd1d78036e8c1eb433cda173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// 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) {}