repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
fsyntax-only1.C
blob
19adb7e612939bf69a839a15de90ac4ab3918164
1
// PR c++/80831
2
// { dg-options -fsyntax-only }
3
// { dg-do compile { target c++11 } }
4
5
class A
6
{
7
public:
8
virtual ~A() { }
9
};
10
11
class B { };
12
13
class C : public A { };
14
15
template<class J>
16
class D : public C
17
{
18
public:
19
D() { }
20
~D() { }
21
};
22
23
class E
24
{
25
public:
26
static E& p();
27
B q();
28
template<class J>
29
B q(void (J::*r)())
30
{
31
new D<J>();
32
return q();
33
}
34
};
35
36
void t()
37
{
38
class F
39
{
40
public:
41
virtual void s() { }
42
};
43
E& x = E::p();
44
B y = x.q(&F::s);
45
}