Closed stuart-byma closed 1 year ago
Thanks for the cleanup. Very much appreciated
I know it's a bit late but this should have been flagged as a breaking interface change because existing code that overrides httpserver::http_resource::render_GET etc. now has an "invalid covariant return type" error and there is no way to write code that works with both the old const and new non-const return types.
Identify the Bug
https://github.com/etr/libhttpserver/issues/284
Description of the Change
Replace all instances of
const shared_ptr<http_response>
withshared_ptr<http_response>
Alternate Designs
There is no alternate design
Possible Drawbacks
I don't believe there are any.
Verification Process
All tests pass. Everything compiles fine. clang-tidy no longer reports the issue in a code base that uses this return type.
Release Notes
Remove ineffective/unneeded const from std::shared_ptr return types.