1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <initializer_list> struct Vec3 { int a, b, c; }; struct VecN { int *v; VecN( std::initializer_list<int> const &il ) : v( new int[ il.size() ] ) {} // for the sake of demo }; int main() { Vec3 foo = { 1, 2, 3 }; foo = Vec3{ 4, 5, 6 }; VecN bar = { 1, 2, 3, 5, 8 }; } |
I2luY2x1ZGUgPGluaXRpYWxpemVyX2xpc3Q+CgpzdHJ1Y3QgVmVjMyB7CmludCBhLCBiLCBjOwp9OwoKc3RydWN0IFZlY04gewppbnQgKnY7CgpWZWNOKCBzdGQ6OmluaXRpYWxpemVyX2xpc3Q8aW50PiBjb25zdCAmaWwgKQo6IHYoIG5ldyBpbnRbIGlsLnNpemUoKSBdICkge30gLy8gZm9yIHRoZSBzYWtlIG9mIGRlbW8KfTsKCmludCBtYWluKCkgewpWZWMzIGZvbyA9IHsgMSwgMiwgMyB9Owpmb28gPSBWZWMzeyA0LCA1LCA2IH07CgpWZWNOIGJhciA9IHsgMSwgMiwgMywgNSwgOCB9Owp9
-
upload with new input
-
result: Success time: 0s memory: 2956 kB returned value: 0


