Bug #7164
closedWt failed due to "error C2039: 'runtime_error': is not a member of 'std'" under /permissive- + MSVC
0%
Description
Hello,
Wt failed due to "error C2039: 'runtime_error': is not a member of 'std'" under /permissive- mode when built on MSVC. You use std::runtime_error, but don't have included until later. Could you please help take a look at this? Thanks in advance!
Note:
Wt requires boost. You can get boost 32bits and 64bits from following address and Change the install path:
32bits: c:\boost_1_67_0\x86
64bits: c:\boost_1_67_0\x64
Boost: https://sourceforge.net/projects/boost/files/boost-binaries/1.67.0/
Repro steps:
- Open VS2017 x86 Native tools command tool
- git clone https://github.com/emweb/wt d:\Wt\src
- cd D:\Wt
- mkdir build_x86 && pushd build_x86
- cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.17134.0 -DBOOST_PREFIX=C:\boost_1_67_0\x86 -DBOOST_LIBRARYDIR=C:\boost_1_67_0\x86\lib32-msvc-14.1 ..\src\
- msbuild /m /p:Configuration=Release;Platform=Win32 ALL_BUILD.vcxproj /t:Rebuild
Actual result:
D:\Wt\src\src\Wt\Core\observing_ptr_impl.hpp(139): error C2039: 'runtime_error': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\functional(25): note: see declaration of 'std'
D:\Wt\src\src\Wt\Core\observing_ptr_impl.hpp(148): error C2039: 'runtime_error': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\functional(25): note: see declaration of 'std'
Updated by Roel Standaert over 5 years ago
- Status changed from New to Resolved
We should indeed include <stdexcept>
if we're using runtime_error
. I pushed a fix to 4.1-release
and master
.
Updated by Roel Standaert over 5 years ago
- Status changed from Resolved to Closed
Fix released in 4.1.1