Commit 36eb535c authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

in uncaught_exceptions, if windows, assume c++17

Summary: This permits removal of the `_getptd()`-based implementation of `folly::uncaught_exceptions` sometimes used on windows, in favor of forwarding to `std::uncaught_exceptions`.

Reviewed By: akrieger

Differential Revision: D26509011

fbshipit-source-id: b8fd14df91fcd849420d3c52328cb080b528245b
parent 36dbf002
......@@ -53,12 +53,6 @@ inline int uncaught_exceptions() noexcept {
return *(reinterpret_cast<unsigned int*>(
static_cast<char*>(static_cast<void*>(__cxxabiv1::__cxa_get_globals())) +
sizeof(void*)));
#elif defined(FOLLY_EXCEPTION_COUNT_USE_GETPTD)
// _getptd() returns a _tiddata* (defined in mtdll.h).
// The offset below returns _tiddata::_ProcessingThrow.
return *(reinterpret_cast<int*>(
static_cast<char*>(static_cast<void*>(_getptd())) + sizeof(void*) * 28 +
0x4 * 8));
#elif defined(FOLLY_EXCEPTION_COUNT_USE_STD)
return std::uncaught_exceptions();
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment