Skip to content

[rosidl_generator_cpp] Generate constructors that take all msg members as arguments #842

@jmachowinski

Description

@jmachowinski

Feature request

Feature description

It would be nice, if for every msg a constructor would be generated, that takes all msg members as arguments.
There would be some positive effects from this:

  • Compile time check if msg was modified
  • Makes it harder to 'forget' to initialize a member
  • Enforces RVO

Implementation considerations

Would slightly raise compile times
Default constructors must stay for compability

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions