blob: 3e3caf7721d7c4791663f64b5e133ff5ece06092 (
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
|
#if defined(__BLOCKS__) && defined(__clang__)
extern "C" void abort(void);
class Test {
public:
int i;
Test() : i(0)
{
}
~Test()
{
i = -1;
}
Test(const Test&r)
{
i = r.i;
}
void speak() const
{
if (i != 0)
abort();
}
};
#endif
int main (int , char * const [])
{
#if defined(__BLOCKS__) && defined(__clang__)
Test t;
^{ t.speak(); }();
#endif
return 0;
}
|