-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
The MSVC team regularly builds popular open-source projects, including yours, with development versions of the build tools in order to find and fix regressions in the compiler and libraries before they can ship and cause trouble for the world. This also allows us to provide advance notice of breaking changes, which is the case here.
librealsense failed to build due to error C2280 with /std:c++latest option in VS 2022. Could you please help to take a look at this? Thanks in advance!
Repro steps:
- Open VS202 x64 CMD.
- git clone https://github.com/IntelRealSense/librealsense C:\gitP\IntelRealSense\librealsense
set _CL_=/std:c++latest /D_HAS_AUTO_PTR_ETC=1 /D_HAS_DEPRECATED_ALLOCATOR_MEMBERS /D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING /Zc:strictStrings- /Zc:char8_t- /Zc:equalityRewrite-- cd /d C:\gitP\IntelRealSense
- mkdir build_amd64 && cd build_amd64
- cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.26100.0 -DBUILD_LEGACY_LIVE_TEST=true -DBUILD_EXAMPLES=true -DBUILD_WITH_TM2=true -DCHECK_FOR_UPDATES=true ..
- msbuild /m /p:Platform=x64 /p:Configuration=Release realsense2.sln /t:Rebuild
Actual result:
50>C:\gitP\IntelRealSense\librealsense\src\mf\mf-backend.cpp(32,9): error C2280: 'std::basic_ostream<char,std::char_traits> &std::operator <<<std::char_traits>(std::basic_ostream<char,std::char_traits> &,const wchar_t *)': attempting to reference a deleted function [C:\gitP\IntelRealSense\librealsense\build_amd64\realsense2.vcxproj]
50>C:\gitP\IntelRealSense\librealsense\src\mf\mf-backend.cpp(32,9): error C2088: built-in operator '<<' cannot be applied to an operand of type 'std::basic_ostream<char,std::char_traits>' [C:\gitP\IntelRealSense\librealsense\build_amd64\realsense2.vcxproj]