Skip to content

Remove ineffective/unneeded const from shared_ptr return types#285

Merged
etr merged 3 commits intoetr:masterfrom
stuart-byma:removeConstSharedPtr
Sep 30, 2022
Merged

Remove ineffective/unneeded const from shared_ptr return types#285
etr merged 3 commits intoetr:masterfrom
stuart-byma:removeConstSharedPtr

Conversation

@stuart-byma
Copy link
Copy Markdown
Contributor

Identify the Bug

#284

Description of the Change

Replace all instances of const shared_ptr<http_response> with shared_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 <http_response> return types.

@etr etr merged commit f33553c into etr:master Sep 30, 2022
@etr
Copy link
Copy Markdown
Owner

etr commented Sep 30, 2022

Thanks for the cleanup. Very much appreciated

@jcphill
Copy link
Copy Markdown
Contributor

jcphill commented Jun 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants