libde265 icon indicating copy to clipboard operation
libde265 copied to clipboard

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

Open dvorkanton opened this issue 4 years ago • 2 comments

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.

dvorkanton avatar Mar 03 '21 18:03 dvorkanton

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

kasperisager avatar Jan 25 '25 14:01 kasperisager

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

dvorkanton avatar Jan 25 '25 14:01 dvorkanton