gcc/testsuite/g++.old-deja/g++.brendan/overload6.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed overloading |
| 3 | struct temp_string { |
| 4 | temp_string (const unsigned char); |
| 5 | }; |
| 6 | |
| 7 | class String { |
| 8 | public: |
| 9 | String& operator = (temp_string); |
| 10 | String& operator = (const String&); |
| 11 | }; |
| 12 | class S { |
| 13 | public: |
| 14 | operator temp_string & () const; |
| 15 | }; |
| 16 | |
| 17 | S lbuf; |
| 18 | |
| 19 | static void e_r () |
| 20 | { |
| 21 | String a; |
| 22 | a = lbuf; |
| 23 | return; |
| 24 | } |