Repository navigation
fix(share_plus): remove extra qualification that breaks Windows C++20 builds - #4010
Open
ChandraChaan wants to merge 1 commit into
Open
ChandraChaan wants to merge 1 commit into
ChandraChaan wants to merge 1 commit into
Conversation
Author
|
The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
share_plus_windows_plugin.hdeclares a member with its class name in front of it:An extra qualification on a member declaration isn't valid C++. MSVC used to accept it in permissive mode, but apps that compile with
/std:c++20(which turns on/permissive-) fail witherror C4596: 'Utf16FromUtf8': illegal qualified name in member declaration, so share_plus can't be built in those projects at all.This removes the qualification. The definition in
share_plus_plugin.cppand every call site are unchanged, so there's no behaviour change. I checked the rest of the plugins' Windows headers and this was the only occurrence.I verified the before and after with
clang++ -std=c++20 -fsyntax-onlyon a reduced example: it reports "extra qualification on member" for the old line and accepts the new one. I don't have a Windows machine to run a full MSVC build, so a CI run on Windows would be welcome.Related Issues
Checklist
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles.flutter analyze) does not report any problems on my PR.Breaking Change