Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Named tuple for C++. Parent comment
For example if you have a struct like:
struct data { double w; double x; double y; double z; };
struct data d = {.w = 1.0, .x = 1.0, .y = 1.0, .z = 1.0};
I'm not sure why this feature never made its way into a C++ standard over the years.
For example if you have a struct like:
You can then create a struct of that type using syntax like: Then you could have your functions take a struct data as a parameter, and use designated initializers to have syntax for keyword parameters.I'm not sure why this feature never made its way into a C++ standard over the years.