blob: a4aab37d9dee8fec30cb2c2fef30bc611690557b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include "base.h"
class Foo : public FooBase {
public:
Foo();
// Deliberately defined by hand.
Foo &operator=(const Foo &rhs) {
x = rhs.x; // break1
a = rhs.a;
return *this;
}
int a;
};
namespace ns {
class Foo2 : public Foo2Base {
public:
Foo2();
// Deliberately defined by hand.
Foo2 &operator=(const Foo2 &rhs) {
x = rhs.x; // break2
a = rhs.a;
return *this;
}
int a;
};
} // namespace ns
extern Foo foo1;
extern Foo foo2;
extern ns::Foo2 foo2_1;
extern ns::Foo2 foo2_2;
|