Revert "Closure.h: use static_assert instead of LOG(FATAL)"

This reverts commit a17ebc84d49ce763ffa64c8db0f85638bb5ace63.

GitOrigin-RevId: deae227b726bdcaead7d7b49f2171a438f58e2c7
This commit is contained in:
Arseny Smirnov 2020-10-09 19:56:05 +03:00
parent 00049a842a
commit 44e3c6fb58

View File

@ -124,16 +124,16 @@ class DelayedClosure {
explicit DelayedClosure(
const DelayedClosure<FromActorT, FromFunctionT, FromArgsT...> &other,
std::enable_if_t<!LogicAnd<std::is_copy_constructible<FromArgsT>::value...>::value, int> = 0) {
static_assert(std::is_same<FromActorT, FromActorT>::value, "Deleted constructor");
LOG(FATAL) << "Deleted constructor";
std::abort();
}
template <class FromActorT, class FromFunctionT, class... FromArgsT>
std::enable_if_t<!LogicAnd<std::is_copy_constructible<FromArgsT>::value...>::value,
DelayedClosure<FromActorT, FromFunctionT, FromArgsT...>>
do_clone(const DelayedClosure<FromActorT, FromFunctionT, FromArgsT...> &value) const {
static_assert(std::is_same<FromActorT, FromActorT>::value,
"Trying to clone DelayedClosure that contains noncopyable elements");
UNREACHABLE();
LOG(FATAL) << "Trying to clone DelayedClosure that contains noncopyable elements";
std::abort();
}
template <class FromActorT, class FromFunctionT, class... FromArgsT>