#include <iostream>
using namespace std;
struct T {
T (const char *s="") : a(s) { cout << "ctor : " << a << endl; }
T (const T& rhs) : a(rhs.a) { cout << "ctor : " << a << endl; }
~T() { cout << "dtor : " << a << endl; }
string a;
};
int main (void)
{
T kerker("kerker");
T *p = (T *)operator new (sizeof(T) * 3);
for (int i = 0; i < 3; i++) {
*p = T(kerker);
p++;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKc3RydWN0IFQgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIFQgKGNvbnN0IGNoYXIgKnM9IiIpIDogYShzKSAgICAgeyBjb3V0IDw8ICJjdG9yIDogIiA8PCBhIDw8IGVuZGw7IH0gICAgICAgICAKICAgIFQgKGNvbnN0IFQmIHJocykgICAgIDogYShyaHMuYSkgeyBjb3V0IDw8ICJjdG9yIDogIiA8PCBhIDw8IGVuZGw7IH0gICAgICAgICAKICAgIH5UKCkgeyBjb3V0IDw8ICJkdG9yIDogIiA8PCBhIDw8IGVuZGw7IH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHN0cmluZyBhOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKaW50IG1haW4gKHZvaWQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIFQga2Vya2VyKCJrZXJrZXIiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIFQgKnAgPSAoVCAqKW9wZXJhdG9yIG5ldyAoc2l6ZW9mKFQpICogMyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMzsgaSsrKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAqcCA9IFQoa2Vya2VyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICBwKys7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgIHJldHVybiAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKfSA=