Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.other/ref4.C

raw
1 // { dg-do assemble }
2
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 27 Feb 2001 <[email protected]>
5
6 // Bug 2117. A conversion op to reference type created a temporary, even
7 // when bound to another reference.
8
9 struct Abstract
10 {
11 virtual void Foo () = 0;
12 };
13
14 struct Proxy
15 {
16 operator Abstract & ();
17 Abstract &Convert ();
18 };
19
20 void Baz (Abstract &);
21
22 void Foo ()
23 {
24 Proxy proxy;
25
26 Baz (proxy);
27 Baz (proxy.Convert ());
28 }