You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compile-c-c++ bin\msvc-14.3\debug\crypto-openssl\cxxstd-20-iso\deprecated-functions-off\link-static\logging-off\threading-multi\src\block_cache.obj
block_cache.cpp
D:\Work\Source\libtorrent-build\openssl3\libtorrent-x86\include\libtorrent/units.hpp(168): error C2039: 'result_type': is not a member of 'std::hash<int>'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\system_error(410): note: see declaration of 'std::hash<int>'
I've found that when it builds libtorrent source files, __cplusplus is set to 199711L (however as you can see above it's using c++20 somewhere else so we get a conflict).
It works with cxxstd=11 (and I think 14 too), because the "culprit" was not deprecated in this standards yet.
The text was updated successfully, but these errors were encountered:
So, it's required to pass cxxflags="\"/Zc:__cplusplus\"" for the build to work properly under MSVC compiler. Please update docs / fix build system so one do not have to specify it manually.
So, the working command would be something like b2.exe cxxstd=20 cxxflags="\"/Zc:__cplusplus\"".
Please provide the following information
libtorrent version (or branch): 1.2.19.
platform/architecture: Windows 10.
compiler and compiler version: Microsoft Visual C++ 2022.
please describe what symptom you see, what you would expect to see instead and
how to reproduce it.
Result:
I've found that when it builds libtorrent source files,
__cplusplus
is set to199711L
(however as you can see above it's using c++20 somewhere else so we get a conflict).It works with
cxxstd=11
(and I think14
too), because the "culprit" was not deprecated in this standards yet.The text was updated successfully, but these errors were encountered: