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

Fix compilation on Windows with /std:c++latest #287

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dvorkjoker
Copy link

@dvorkjoker dvorkjoker commented Mar 3, 2021

When compiling libde265 on Windows using MSVC 2019 and the latest C++ standard preview (which is C++20), I get the following error:
error C4496: nonstandard extension 'for each' used: replace with ranged-for statement
The similar issue arises when using clang-cl.

Actually, MSVC supports ranged-for statement since MSVC 2012, and has full C++11 support for auto since MSVC 2015 (reference); _MSC_VER version code for MSVC 2015 is 1900. Hence the easy fix.

dvorkjoker and others added 2 commits March 3, 2021 23:17
When compiling libde265 on Windows using MSVC 2019 and the latest C++ standard preview (which is C++20), I get the following error:
`error C4496: nonstandard extension 'for each' used: replace with ranged-for statement`
The similar issue arises when using clang-cl.

Actually, MSVC supports ranged-for statement since MSVC 2012, and has full C++11 support for `auto` since MSVC 2015 (reference: https://docs.microsoft.com/en-us/previous-versions/hh567368(v=vs.140)?redirectedfrom=MSDN); `_MSC` version code for MSVC 2015 is `1900`. Hence the easy fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant