Commit 2f331d91 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Tweak throw_exception condition

Summary: [Folly] Tweak throw_exception condition, fixing reference to `__GNUC__` and restructuring to make adding checks for alternative compilers more trivial.

Reviewed By: mzlee

Differential Revision: D7102307

fbshipit-source-id: e4e00ded71f37db8fa93822744b608b42960a58a
parent 3383a04e
......@@ -29,10 +29,10 @@ namespace folly {
/// -fno-exceptions.
template <typename Ex>
[[noreturn]] FOLLY_NOINLINE FOLLY_COLD void throw_exception(Ex&& ex) {
#if !__GNUC || __EXCEPTIONS
throw static_cast<Ex&&>(ex);
#else
#if (__GNUC__ && !__EXCEPTIONS)
std::terminate();
#else
throw static_cast<Ex&&>(ex);
#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