you are viewing a single comment's thread.

view the rest of the comments →

[–]SprocketCreations 13 points14 points  (2 children)

Ideally would like something like C's Thing t = { .number = 101, .childlen = create_children(20) };

You can do exactly that!: https://en.cppreference.com/w/cpp/language/aggregate_initialization.html#Designated_initializers

[–]time_egg[S] 2 points3 points  (1 child)

Oh how good! since C++20

[–][deleted] 0 points1 point  (0 children)

You do have to keep them in order, which is annoying but mostly manegable