Commit 63ad770a authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Fix minor compilation issue for PPC64LE

Summary:
Always throwing an exception in a function marked `noexcept` generates warnings that show up as errors, so just directly call `std::terminate()` instead.

Fixes https://github.com/facebook/folly/issues/1124

Reviewed By: aary

Differential Revision: D15263327

fbshipit-source-id: cf12bab76a5dc7da9414c6873fc0b0c1335691fa
parent 2180558b
......@@ -222,11 +222,13 @@ bool atomic_fetch_reset_x86(
template <typename Atomic>
bool atomic_fetch_set_x86(Atomic&, std::size_t, std::memory_order) noexcept {
throw std::logic_error{"Incorrect function called"};
// This should never be called on non x86_64 platforms.
std::terminate();
}
template <typename Atomic>
bool atomic_fetch_reset_x86(Atomic&, std::size_t, std::memory_order) noexcept {
throw std::logic_error{"Incorrect function called"};
// This should never be called on non x86_64 platforms.
std::terminate();
}
#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