MSVC C2280 error with ranged for and deleted copy ctor

Luboš Luňák l.lunak at collabora.com
Mon Dec 9 16:48:29 UTC 2019


 Hello,

 does somebody know why I'm getting "error 
C2280: 'GrFragmentProcessor::CIter::CIter(const GrFragmentProcessor::CIter 
&)': attempting to reference a deleted function" [1] in a ranged for?

 The relevant code is [2]. "GrFragmentProcessor::PaintCRange" is a ctor call  
for a range type [3], which has "return CIter(fT);" as its begin(). And CIter 
indeed has a deleted copy ctor, but AFAICT it shouldn't be needed, C++17's 
guaranteed copy ellision should take care of it.

 And it builds with GCC/Clang, and it builds even with MSVC here locally. So 
to me it looks like a MSVC bug that's been fixed. How much of a problem would 
it be to bump the minimal required MSVC version (not that I know which one it 
would be exactly)?

[1] 
https://ci.libreoffice.org/job/gerrit_windows/52000/consoleFull#410722581cbd6b0d4-2729-45f4-a019-828721d0af3e
[2] 
https://skia.googlesource.com/skia/+/refs/heads/chrome/m80/src/gpu/ccpr/GrCCDrawPathsOp.cpp#19
[3] 
https://skia.googlesource.com/skia/+/refs/heads/chrome/m80/src/gpu/GrFragmentProcessor.h#582


-- 
 Luboš Luňák
 l.lunak at collabora.com


More information about the LibreOffice mailing list