#include <initializer_list>

struct Foo {
    Foo(int x_, int y_) : x(x_), y(y_) {}
    int x;
    int y;
};

struct Bar {
    Bar(Foo first_, Foo second_) : first(first_), second(second_) {}
    Foo first;
    Foo second;
};

#include <iostream>

int main() {
    auto list1 = std::initializer_list<int>{ 1, 2 };    
    Bar b = { list1, list1 };
    std::cout << b.first.x << ", " << b.first.y << ", ";
    std::cout << b.second.x << ", " << b.second.y << std::endl;
    // ^ Output: 1, 2, 3, 4
}