Consider to redesign generated C++ read constructor #565
Labels
c++
C++ language generator
code generator compatibility
This can break backward compatibility of generated code
enhancement
New feature or request
Currently, the generated C++ read constructor reads all fields in constructor initializers using dedicated private read methods. This solution strongly relies on Return Value Optimization and leads to many move constructor calls in case of arrays or optional fields.
It will be probably better to leave all fields to be initialized by default and then read them in the constructor body.
The text was updated successfully, but these errors were encountered: