From 44e3c6fb585c635d9e0121eb51f033d1be515451 Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Fri, 9 Oct 2020 19:56:05 +0300 Subject: [PATCH] Revert "Closure.h: use static_assert instead of LOG(FATAL)" This reverts commit a17ebc84d49ce763ffa64c8db0f85638bb5ace63. GitOrigin-RevId: deae227b726bdcaead7d7b49f2171a438f58e2c7 --- tdutils/td/utils/Closure.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tdutils/td/utils/Closure.h b/tdutils/td/utils/Closure.h index d373a91b4..851bec648 100644 --- a/tdutils/td/utils/Closure.h +++ b/tdutils/td/utils/Closure.h @@ -124,16 +124,16 @@ class DelayedClosure { explicit DelayedClosure( const DelayedClosure &other, std::enable_if_t::value...>::value, int> = 0) { - static_assert(std::is_same::value, "Deleted constructor"); + LOG(FATAL) << "Deleted constructor"; + std::abort(); } template std::enable_if_t::value...>::value, DelayedClosure> do_clone(const DelayedClosure &value) const { - static_assert(std::is_same::value, - "Trying to clone DelayedClosure that contains noncopyable elements"); - UNREACHABLE(); + LOG(FATAL) << "Trying to clone DelayedClosure that contains noncopyable elements"; + std::abort(); } template