#include <iostream>

class XX
{
public:
    XX() {
        std::cout<<"C XX\n";
        if (++instCount > 4) {
            throw "Fuck you, I'm not gonna create more than 4 instances";
        }
    }
//private:
    ~XX() {
        std::cout<<"~ XX\n";
        instCount--;
    }
    
private:
    static int instCount;
};

int XX::instCount = 0;

int main() {
    XX *xx;
    try {
        xx = new XX[10];   // runtime error (1)
    } catch (...) {}

    return xx ? 0 : 1;
}
