Re:C's designated initializers give us named arguments
by quietbritishjim on Thursday November 19, 2026 @09:50AM
(#50560868)
I was aware of this but I thought it didn't work if you had any inline default initialisers i.e.
It turns out this was an issue all the way back in C++11, which didn't even have designated initialisers, but inline initialisers like this prevented the struct from being an aggregate, which meant you couldn't write FooParams{1, "y"}. That was fixed in C++14 (as I've just discovered).
[ Parent
| on HN ]
There are no comments on this comment yet.