ice icon indicating copy to clipboard operation
ice copied to clipboard

Remove "cpp:const" metadata

Open bernardnormier opened this issue 6 years ago • 0 comments

The cpp:const metadata makes the mapped servant's member function const, and was introduced years ago when nonmutating was deprecated and replaced by two metadata directives - nonmutating and cpp:const.

Since we are finally removing the nonmutating directive, we should likewise remove cpp:const. In practice, it's useless since servants are called using shared_ptr<Servant>, and not some const objects.

See also https://github.com/zeroc-ice/ice/issues/370

The main backwards-compatibility impact is for "callback" Slice interfaces that use this metadata directive, such as Glacier2::PermissionVerifier: https://github.com/zeroc-ice/ice/blob/3.7/slice/Glacier2/PermissionsVerifier.ice#L74

Existing C++ servant implementations will need to remove "const" on the mapped member function when upgrading to Ice 4.0.

bernardnormier avatar Dec 12 '19 19:12 bernardnormier