1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include "lib.h" #include <cstdio> int Foo::method() { return -72; } Foo::Foo(int val) : x(val) { std::puts(__func__); } Foo::~Foo() { std::puts(__func__); } Bar::Bar() { std::puts(__func__); } Bar::~Bar() { std::puts(__func__); } Base::Base() { std::puts(__func__); } Base::~Base() { std::puts(__func__); }