3 ms·
> Tuples are ordered though. I don't usually think of structs by the order the properties are declared - I usually think of them by name. Think for instance of
by jcelerier 9y ago
> Tuples are ordered though. I don't usually think of structs by the order the properties are declared - I usually think of them by name.
Think for instance of a 2D point structure. There are tons of implementations, all with different naming conventions ; or sometimes storing them in an array. This allows to just do :
auto [x, y] = someRandomLibraryPoint();