language: C++ 4.7.2 (gcc-4.7.2)
date: 413 days 12 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
 
struct test {
    test() { std::cout << "test::test()\n"; }
};
 
struct pod_or_not {
    int i;
    test t;
};
 
int main() {
    std::cout << "auto storage:\n";
    pod_or_not pon;
    std::cout << "heap storage:\n";
    pod_or_not* ppon = new pod_or_not;
 
    delete ppon;
}