Homec4science

Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.

Authored by Peter Collingbourne <pcc@google.com> on Jan 25 2018, 02:15.

Description

Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC.

_HAS_EXCEPTIONS is specific to the MSVC STL and defining it to 0 causes
problems with libc++, so libc++ users may leave it undefined. This can
cause GTEST_HAS_EXCEPTIONS to be defined incorrectly if the user has
disabled exceptions via the compiler, which can lead to build errors.

_CPPUNWIND is a builtin macro provided by the compiler so it should
work with both STLs.

Details

Committed
Peter Collingbourne <pcc@google.com>Jan 25 2018, 23:15
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:f9155307911e: Pass -EHs-c- to disable exceptions with MSVC.
Branches
Unknown
Tags
Unknown

Event Timeline

Peter Collingbourne <pcc@google.com> committed R9484:3498a1ac52de: Use _CPPUNWIND instead of _HAS_EXCEPTIONS with MSVC. (authored by Peter Collingbourne <pcc@google.com>).Jan 25 2018, 23:15