Skip to content

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.
@kasperisager
Copy link

I just hit this as well while trying to compile the library using clang-cl.

@dvorkjoker
Copy link
Author

@farindk Hi Dirk, can you merge this pull request?

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.

2 participants