gazebosim/sdformat

Changes to sdf::ParamPrivate should not break ABI

Open

#773 opened on Dec 6, 2021

View on GitHub
 (0 comments) (1 reaction) (0 assignees)C++ (122 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (216 stars)
PR merge metrics
 (PR metrics pending)

Description

Desired behavior

Per the Pimpl idiom, one would expect changes to the sdf::ParamPrivate class to not break ABI, but since the class is in a public header (Param.h) and since it's members are used in function templates of sdf::Param, any changes made to sdf::ParamPrivate could break ABI.

This is similar to https://github.com/ignitionrobotics/sdformat/issues/607

Alternatives considered

n/a

Implementation suggestion

Provide accessor functions in sdf::Param so that the function templates do not need direct access to dataPtr. Then we can move sdf::ParamPrivate to Param.cc. This would be a breaking change, so it will have to target the main branch.

Contributor guide