Y
Hacker News
new
|
ask
|
show
|
jobs
by
kccqzy
3 hours ago
That's a C99 feature, designated initializer. Hardly modern. Yes it was ported to C++ relatively late, but it happened in C++20.
2 comments
rwmj
2 hours ago
Don't C++ designated initializers require you to initialize in struct order? That makes them kind of annoying to use.
link
manwe150
3 hours ago
Wouldn’t c99 also make you name the type there (looking sort of like a cast), further straying from being just kwargs? I thought this was a c++ deduction feature for it to bind the initializer to whether method could take that list
link