etl icon indicating copy to clipboard operation
etl copied to clipboard

fix(string_stream): add missing initializations of const format specifiers

Open KnoerleMaTLS opened this issue 1 year ago • 5 comments

This pull request introduces a possible fix for the issue #848 by adding the missing initializers.

KnoerleMaTLS avatar Feb 22 '24 12:02 KnoerleMaTLS

Review changes with SemanticDiff.

semanticdiff-com[bot] avatar Feb 22 '24 12:02 semanticdiff-com[bot]

Were you getting warning from the compiler?

jwellbelove avatar Feb 22 '24 18:02 jwellbelove

Warning about what/where? Regarding the propsed fix?

KnoerleMaTLS avatar Feb 23 '24 09:02 KnoerleMaTLS

Did you get errors or warnings about 'missing initializers'? left_spec & right_spec have default constructors, so they shouldn't need explicit initialisation.

jwellbelove avatar Feb 24 '24 10:02 jwellbelove

Yeah, i got compiler errors about missing initializers for left and right. Please check #848 for further details.

Yes, the structs left_spec and right_spec have compiler generated default constructors, but regarding the C++ standard this is not enough to initialize a const object ("default-initialization of a const object could not call an implicitly declared default constructor"). I also tried to explain this in more detail in the mentioned issue.

KnoerleMaTLS avatar Feb 26 '24 07:02 KnoerleMaTLS