Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from C++11 to C++17 (second try) #1196

Merged
merged 12 commits into from
Nov 24, 2020
Merged

Conversation

julianoes
Copy link
Collaborator

Previous try was #884.

@JonasVautherin
Copy link
Collaborator

Almost there, just missing iOS. I see a lot of errors of the sort: "only available on iOS 11 or newer":

error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on iOS 11 or newer

JonasVautherin
JonasVautherin previously approved these changes Sep 25, 2020
@julianoes
Copy link
Collaborator Author

julianoes commented Nov 22, 2020

Rebased on top of develop / 496795c.

@julianoes julianoes marked this pull request as ready for review November 22, 2020 16:42
Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀

@@ -238,25 +222,25 @@ class MAVLinkParameters {

bool set_as_same_type(const std::string& value_str)
{
if (_value.is<uint8_t>()) {
if (std::get_if<uint8_t>(&_value)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose _value.is does not work with a variant, hence this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so. There is also std::get which throws instead: https://en.cppreference.com/w/cpp/utility/variant/get

@julianoes
Copy link
Collaborator Author

🎉

@julianoes julianoes merged commit e869ba8 into develop Nov 24, 2020
@julianoes julianoes deleted the pr-move-to-cpp17-again branch November 24, 2020 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants