-
Notifications
You must be signed in to change notification settings - Fork 938
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 warnings #2804
Fix warnings #2804
Conversation
apps/openmw/mwgui/loadingscreen.cpp:81:36: warning: loop variable 'extension' of type 'const std::__cxx11::basic_string<char>' creates a copy from type 'const std::__cxx11::basic_string<char>' [-Wrange-loop-construct] for(auto const extension: supported_extensions) ^ apps/openmw/mwgui/loadingscreen.cpp:81:25: note: use reference type 'const std::__cxx11::basic_string<char> &' to prevent copying for(auto const extension: supported_extensions) ^~~~~~~~~~~~~~~~~~~~~ &
This list doesn't change and the size is known at compile time.
Two points:
|
Class template arguments deduction is a C++17 feature: https://en.cppreference.com/w/cpp/container/array/deduction_guides, so it's not possible to use it now. Also even with C++17 partial argument deduction ( |
We can bump to C++17 and see. So long as MacOS accepts (the rest shouldn't be a problem) it, then we're good to go. Right now, the only thing really holding us back was that std::filesystem wasn't yet supported, but that doesn't mean that other things haven't been implemented. Perhaps it's worth a PR to bump C++17 and give it at try? |
Android's still missing chunks of C++17 |
Yes, so is MacOS pre 10.15 As I said, we can give it a try and see what we can get away with given the circumstances. However, while we are waiting on travis to catch up... I would assume that Android NDK has at least been updated by now? Do we have a status report? According to this: Paging @xyzz : have any comments on this? |
android/ndk#609 is still open so that's at least one part that's missing. Not sure if there's anything else. |
@xyzz could you test if this is available as of r21 ? https://en.cppreference.com/w/cpp/container/array/deduction_guides |
No description provided.