aboutsummaryrefslogtreecommitdiffstats
path: root/tests/rule-of-three/bug388677.cpp
blob: 7bc1882b174057823256af003a931c4530be8a79 (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
#include <stdio.h>

class A
{
public:
    A()
    {
    }

    ~A()
    {
    }

    A(const A &) = delete;
    A& operator=(const A &) = delete;
};

class B : public A
{
public:
    B() : A()
    {
        i = 4;
    }

    ~B()
    {
        printf("%d\n", i);
    }

    int i;
};