#include <iostream>

struct rect {
    int x, y, w, h;
};

std::ostream& operator<<(std::ostream& os, rect r)
{
    return os << r.x << " " << r.y << " " << r.w << " " << r.h << '\n';
}

struct A
{
    rect bounds;

    A(int x, int y, int w, int h)
    {
        std::cout << "O1: " << x << " " << y << " " << w << " " << h << "\n";
        bounds = { x,y,w,h };
        std::cout << "O2: " << rect(bounds);
    }
};

struct B : A
{
    B(rect bounds) : A(bounds.x, bounds.y, bounds.w, bounds.h)
    {
        std::cout << "T1: " << rect(bounds);
        std::cout << "T2: " << rect(this->bounds) << "\n";
    }
};

int main()
{
    B b({ 300, 200, 200, 200 });
}