Project

General

Profile

Actions

Bug #7164

closed

Wt failed due to "error C2039: 'runtime_error': is not a member of 'std'" under /permissive- + MSVC

Added by Quella Zhang over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/02/2019
Due date:
% Done:

0%

Estimated time:

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:

  1. Open VS2017 x86 Native tools command tool
  2. git clone https://github.com/emweb/wt d:\Wt\src
  3. cd D:\Wt
  4. mkdir build_x86 && pushd build_x86
  5. 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\
  6. 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'

Actions #1

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.

Actions #2

Updated by Roel Standaert over 5 years ago

  • Status changed from Resolved to Closed

Fix released in 4.1.1

Actions

Also available in: Atom PDF