3 ms·
> Braced initialization is crazy and I don't understand it It's a disambiguation thing: https://en.wikipedia.org/wiki/Most_vexing_parse https://en.wikipedia.or
by kllrnohj 7y ago
> Braced initialization is crazy and I don't understand it
It's a disambiguation thing: https://en.wikipedia.org/wiki/Most_vexing_parse 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#es23-prefer-the--initializer-syntax https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...