Closed fermentedfly closed 4 months ago
Review changes with SemanticDiff.
Hi, when I upgraded the etl library in my local project to the version 2.38.11 from 2.38.10, I stumbled across this ticket. For std::variant, it is specified that it contains an element of the first type if default constructed and thus the index must be 0. Is there a reason why the etl must differ here? If so, the creation of the first type would have to be removed in the default constructor and it would also be helpful if a note were added to the documentation that this deviates from std::variant and that the class therefore does not behave as expected.
Is there a reason why the etl must differ here?
You are right, this change does look incorrect.
Should I create a pull request?
No need, I'm doing a simple revert, plus a couple of extra tests to check the value initialisation.
Okay, thank you very much! Have a nice weekend.
Hi,
It seems variant_varadic still contains valid type_id when default constructed, initializing to
variant_npos
should resolve the issue.Regards, Manuel