| 1 |
// { dg-do assemble } |
| 2 |
// GROUPS passed friends |
| 3 |
// friends file |
| 4 |
// From: rwave!myersn%[email protected] (Nathan Myers) |
| 5 |
// Date: Thu, 17 Dec 92 16:33 PST |
| 6 |
// Subject: 2.3.2: friend decl of new confuses constructor |
| 7 |
// Message-ID: <[email protected]> |
| 8 |
|
| 9 |
#include <stddef.h> |
| 10 |
#include <new> |
| 11 |
struct Foo { |
| 12 |
#if __cplusplus <= 199711L |
| 13 |
friend void* operator new(size_t) throw (std::bad_alloc); |
| 14 |
#else |
| 15 |
friend void* operator new(size_t); |
| 16 |
#endif |
| 17 |
friend void operator delete(void*) throw (); |
| 18 |
Foo(); |
| 19 |
~Foo(); |
| 20 |
}; |
| 21 |
Foo::Foo() { } |
| 22 |
Foo::~Foo() { } |