uptane / aktualizr

C++ Uptane Client
Mozilla Public License 2.0
16 stars 16 forks source link

RFC: Increase C++ version to C++17 #106

Closed cajun-rat closed 1 month ago

cajun-rat commented 7 months ago

At the moment Aktualizr requires C++11 to build. I propose we bump that to C++17.

Full C++17 support came in gcc 8 (although most of it was present in gcc 7 already. In terms of our likely target platforms already ship that:

That suggests that getting a C++17 compiler shouldn't be a huge problem for our downstream.

Why not go further? C++20 support would require gcc 10 or 11, and while we could go that far it seems like we should be conservative by default.

Comments welcome!

pattivacek commented 7 months ago

I'm on board. I remember when we made the decision to support C++11 five or six years ago!

Edit: found it! Not sure why I felt like looking it up, curiosity got the best of me.

cajun-rat commented 7 months ago

I'm on board. I remember when we made the decision to support C++11 five or six years ago!

Edit: found it! Not sure why I felt like looking it up, curiosity got the best of me.

Brings back good memories!

I've been working on a big series to remove the deprecated openssl functions, and I have this upgrade as a part of that at the moment. It is still WIP, but the (unstable) branch is feat/openssl3 on my github. It is currently built on the Toradex fork, but I have another task to rebase that and bring it close to upstream.

mike-sul commented 7 months ago

That suggests that getting a C++17 compiler shouldn't be a huge problem for our downstream.

That's not an issue for Foundries at all, we moved to gcc 11.4 and clang 11.1 long time ago.

mike-sul commented 7 months ago

Why not go further? C++20 support would require gcc 10 or 11, and while we could go that far it seems like we should be conservative by default.

I would be conservative too, unless there are strong benefits in switching to C++20.

cajun-rat commented 1 month ago

Fixed!