Skip to content

Clang tidy/auto ptr#41

Closed
filodej wants to merge 3 commits intoartyom-beilis:masterfrom
filodej:clang-tidy/auto_ptr
Closed

Clang tidy/auto ptr#41
filodej wants to merge 3 commits intoartyom-beilis:masterfrom
filodej:clang-tidy/auto_ptr

Conversation

@filodej
Copy link

@filodej filodej commented Jun 28, 2018

Hi,
Fist I would like to thank you for a great piece of software and also for making it more available thanks to the recent licence changes.

I am trying to modernize CppCMS (primarily get rid of the deprecated std::auto_ptr).
I have used clang-tidy 5.0 with the modernize-replace-auto-ptr check, so the first commit is simply output from the tool.
The second commit contains my manual changes in order to fix the build (with gcc 7 in c++14 mode) and subsequently fix all tests.

So this pull request contains mainly the following changes:

  • std::auto_ptr has been replaced with std::unique_ptr
  • booster::shared_ptr and booster::weak_ptr (and few related classes and functions) have been replaced with aliases to std equivalents (could be solved differently - e.g. by changing the CppCMS code to use the std classes directly).

I understand that this is the API change and so it probably could be included only to a major version.
I just wanted to share my effort and hear your opinion (I am probably going to make more changes/modernizations based on other clang-tidy suggestions).

Petr Filipsky added 3 commits June 28, 2018 18:29
- remaining std::auto_ptr
- redundant std::move when returning from a function
- (consider using std::unique_ptr instead of naked new)
@dg0yt
Copy link

dg0yt commented Nov 2, 2025

FTR auto_ptr (removed in C++17) prevents the use with modern icu (requires C++17).

@artyom-beilis
Copy link
Owner

There is no more auto_ptr in master branch of CppCMS 2.0 - it isn't there for a long time.

@dg0yt
Copy link

dg0yt commented Nov 2, 2025

Branch, hm. But the latest tag is v2.0.0.beta2, and so package managers stick to 1.2.1.
https://repology.org/project/cppcms/versions

And some packaging of 1.2.1 was done in 2023 and 2024.

@artyom-beilis
Copy link
Owner

Yeah... you right. I should make CppCMS 2.0.0 official main version for a long time ago... Since it is

I kinda assumed most use github. For example cppcms.com runs on it for quite a while:

X-Powered-By: CppCMS/2.0.0.beta2

I should do something about it since recently I did some fixes for Android and Windows.

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

Comments