Re:Proving that C++'s grammar is undecidable
by kllrnohj on Wednesday April 29, 2020 @01:03AM
(#23015560)
> Braced initialization is crazy and I don't understand it
It's a disambiguation thing: https://en.wikipedia.org/wiki/Most_vexing_parse
The simple recommendation is to just always use {} when you want to construct an object, see https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...
https://twitter.com/timur_audio/status/1119160309573242880?l...
I can understand having crazy syntax for rare and exotic things. But variable initialization is not one of those things...