libde265
libde265 copied to clipboard
Fix compilation on Windows with /std:c++latest
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.
I just hit this as well while trying to compile the library using clang-cl.
@farindk Hi Dirk, can you merge this pull request?