Commit 04a42b09 authored by Marko Novakovic's avatar Marko Novakovic Committed by Facebook Github Bot

Added a flag FOLLY_FORCE_EXCEPTION_COUNT_USE_STD

Summary:
The flag FOLLY_FORCE_EXCEPTION_COUNT_USE_STD forces
the usage of std:uncaught_exceptions() for folly's
implementation of uncaught_exceptions()

Reviewed By: yfeldblum

Differential Revision: D5542302

fbshipit-source-id: 2c2f507ab9dde916a160a9c370a267cdcfd7203a
parent 91022bb0
......@@ -18,7 +18,8 @@
#include <exception>
#if defined(__GNUG__) || defined(__clang__)
#if !defined(FOLLY_FORCE_EXCEPTION_COUNT_USE_STD) && \
(defined(__GNUG__) || defined(__clang__))
#define FOLLY_EXCEPTION_COUNT_USE_CXA_GET_GLOBALS
namespace __cxxabiv1 {
// forward declaration (originally defined in unwind-cxx.h from from libstdc++)
......@@ -32,7 +33,8 @@ extern "C" __cxa_eh_globals* __cxa_get_globals() noexcept;
// forward declaration (originally defined in mtdll.h from MSVCRT)
struct _tiddata;
extern "C" _tiddata* _getptd(); // declared in mtdll.h from MSVCRT
#elif defined(_MSC_VER) && (_MSC_VER >= 1900) // MSVC++ 2015
#elif defined(FOLLY_FORCE_EXCEPTION_COUNT_USE_STD) || \
(defined(_MSC_VER) && (_MSC_VER >= 1900)) // MSVC++ 2015
#define FOLLY_EXCEPTION_COUNT_USE_STD
#else
// Raise an error when trying to use this on unsupported platforms.
......
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