#include <iostream>

// === library code ===
struct A {
    int x, y;
    A(int x, int y) : x(x), y(y) {}
};
A getSomeA(int x, int y) {
    return A(x, y);
}
// === end of library code ===

class B : public A {
public:
    B (A &&a) : A(a), someOtherMember(a.x + a.y) {}

    // added public stuff:
    int someOtherFunction() const { return someOtherMember; }

private:
    // added private stuff:
    int someOtherMember;
};

int main() {
    B b(getSomeA(32, 10));
    std::cout << b.x << ", " << b.y << std::endl;
    std::cout << b.someOtherFunction() << std::endl;
};
