Closure.h: use static_assert instead of LOG(FATAL)
GitOrigin-RevId: a17ebc84d49ce763ffa64c8db0f85638bb5ace63
This commit is contained in:
parent
fdc3920572
commit
958b16b8a3
@ -124,16 +124,15 @@ class DelayedClosure {
|
||||
explicit DelayedClosure(
|
||||
const DelayedClosure<FromActorT, FromFunctionT, FromArgsT...> &other,
|
||||
std::enable_if_t<!LogicAnd<std::is_copy_constructible<FromArgsT>::value...>::value, int> = 0) {
|
||||
LOG(FATAL) << "Deleted constructor";
|
||||
std::abort();
|
||||
static_assert(std::is_same<FromActorT, FromActorT>::value, "Deleted constructor");
|
||||
}
|
||||
|
||||
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 {
|
||||
LOG(FATAL) << "Trying to clone DelayedClosure that contains noncopyable elements";
|
||||
std::abort();
|
||||
static_assert(std::is_same<FromActorT, FromActorT>::value,
|
||||
"Trying to clone DelayedClosure that contains noncopyable elements");
|
||||
}
|
||||
|
||||
template <class FromActorT, class FromFunctionT, class... FromArgsT>
|
||||
|
Loading…
x
Reference in New Issue
Block a user