#include <stdio.h>
class A {
bool m_init;
public:
A(){m_init = true; printf ("ctor\n");}
~A(){
printf ("dtor\n");
if (m_init) {
deinit();
}
}
void deinit () {
printf ("deinit!\n");
m_init = false;
}
};
int main() {
A a;
a.~A();
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpjbGFzcyBBIHsKICAgIGJvb2wgbV9pbml0OwpwdWJsaWM6CiAgICBBKCl7bV9pbml0ID0gdHJ1ZTsgcHJpbnRmICgiY3RvclxuIik7fQogICAgfkEoKXsKICAgICAgICBwcmludGYgKCJkdG9yXG4iKTsKICAgICAgICBpZiAobV9pbml0KSB7CiAgICAgICAgICAgIGRlaW5pdCgpOwogICAgICAgIH0KfQoKICAgIHZvaWQgZGVpbml0ICgpIHsKICAgICAgICAgICAgcHJpbnRmICgiZGVpbml0IVxuIik7CiAgICAgICAgICAgIG1faW5pdCA9IGZhbHNlOwogICAgfQp9OwoKaW50IG1haW4oKSB7CgogICAgQSBhOwogICAgYS5+QSgpOwogICAgcmV0dXJuIDA7Cn0=