aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/friend1.C
blob: aed9bd534053752dbc5a6512988389d37262889c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }
// GROUPS passed friends
// friends file
// From: rwave!myersn%rwave.roguewave@cs.orst.edu (Nathan Myers)
// Date:     Thu, 17 Dec 92 16:33 PST
// Subject:  2.3.2: friend decl of new confuses constructor
// Message-ID: <m0n2Vec-0000GrC@rwave.roguewave.com>

#include <stddef.h>
#include <new>
struct Foo {
#if __cplusplus <= 199711L
  friend void* operator new(size_t) throw (std::bad_alloc);
#else
  friend void* operator new(size_t);
#endif
  friend void operator delete(void*) throw ();
  Foo();
  ~Foo();
};
Foo::Foo() { }
Foo::~Foo() { }