Repository navigation
Do not use compound literals (fix MSVC C4576) - #14276
Conversation
|
Thank you for the fix of MSVC compilation mode. Such fixes should go into 3.4 branch first. Please remove URL from commit description (it will be linked to this PR anyway). BTW,
So we need more compatible solution for that. |
|
@kiwixz Could you provide some details how to reproduce problem with MSVC? Do you compile for ARM64 target? PowerPC? |
|
@alalek Sure, I was just compiling for x86_64 Windows 10. It failed when I tried to build ffmpeg's wrapper. I took the opportunity to grep the codebase and fix other similar constructs. |
|
OK. Lets provide fix for FFmpeg wrapper only: Other code should not be processed by MSVC compiler at this moment. |
|
@alalek Yep it was a bad idea, sorry. I changed target to 3.4 and fixed it. |
Do not use compound literals (fix MSVC C4576) (opencv#14276) * do not use compound literals (compat cpp98) * only fix msvc path * remove unnecessary cplusplus check
They are not part of the C++ standard, and MSVC will error out:
See godbolt example.