Skip to content

Use std::as_const instead of qAsConst#61

Merged
dfaure-kdab merged 1 commit into
cornelius:masterfrom
meven:meven/fix-warnings
Nov 6, 2025
Merged

Use std::as_const instead of qAsConst#61
dfaure-kdab merged 1 commit into
cornelius:masterfrom
meven:meven/fix-warnings

Conversation

@meven

@meven meven commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

qAsConst is now deprecated

@meven

meven commented Oct 31, 2025

Copy link
Copy Markdown
Contributor Author

Well std::as_const is C++17 not C++11
https://en.cppreference.com/w/cpp/utility/as_const.html

Would it be considered to bump compiler minimal version to C++17 ?

@dfaure-kdab

Copy link
Copy Markdown
Collaborator

I would say yes, it's time to require C++17, just like Qt 6 (and KDSoap) already do.
Unless @cornelius objects, of course.

@dfaure-kdab

Copy link
Copy Markdown
Collaborator

Can you include a change to the toplevel CMakeLists.txt's CMAKE_CXX_STANDARD then?

qAsConst is now deprecated

And bump CMAKE_CXX_STANDARD version to 17.
@meven meven force-pushed the meven/fix-warnings branch from ba6bdb7 to 7a91684 Compare November 5, 2025 13:12
@meven

meven commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

Can you include a change to the toplevel CMakeLists.txt's CMAKE_CXX_STANDARD then?

Done

@dfaure-kdab dfaure-kdab merged commit 580356d into cornelius:master Nov 6, 2025
7 checks passed
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.

2 participants