-
Notifications
You must be signed in to change notification settings - Fork 418
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
Fix ambiguous auto variable on gcc 7.5 #1976
Conversation
Signed-off-by: Steve Nogar <stephen.m.nogar.civ@army.mil>
@smnogar The linters are unhappy with the length of the line. If you fix that, we can run CI on this and get it in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -816,7 +816,7 @@ class Client : public ClientBase | |||
"Received invalid sequence number. Ignoring..."); | |||
return std::nullopt; | |||
} | |||
auto value = std::move(it->second.second); | |||
std::optional<CallbackInfoVariant> value = std::optional<CallbackInfoVariant>{std::move(it->second.second)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that if the type is explicit on the right then auto
can be used on the left i.e.
std::optional<CallbackInfoVariant> value = std::optional<CallbackInfoVariant>{std::move(it->second.second)}; | |
auto value = std::optional<CallbackInfoVariant>{std::move(it->second.second)}; |
@smnogar would you address comments above? thanks! |
Since there has been no movement on this in a long time, I'm going to close this out. Feel free to respond to the comments and reopen if you are still interested in getting this in, thanks. |
I'm running humble on an older version of embedded linux thats stuck with gcc 7.5. For some reason it didn't like this auto declaration. Could we get this pushed into rolling and humble branches?
This should resolve #1963