From 20794fef3358fa705704b045a5ef20994a6d366c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 23 Jun 2023 06:23:33 +0200 Subject: [PATCH] Better fix for #16 (cherry picked from commit 28ade41af54e774246633e4934be411e21a28717) --- cpp/src/arrow/util/logging.cc | 4 ++-- cpp/src/arrow/util/logging.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/src/arrow/util/logging.cc b/cpp/src/arrow/util/logging.cc index 33336c25a0da2..df3023df598f8 100644 --- a/cpp/src/arrow/util/logging.cc +++ b/cpp/src/arrow/util/logging.cc @@ -66,7 +66,7 @@ class CerrLog { public: explicit CerrLog(ArrowLogLevel severity) : severity_(severity), has_logged_(false) {} - virtual ~CerrLog() noexcept(false) { + virtual ~CerrLog() { if (has_logged_) { stream << std::endl; } @@ -246,7 +246,7 @@ std::ostream& ArrowLog::Stream() { bool ArrowLog::IsEnabled() const { return is_enabled_; } -ArrowLog::~ArrowLog() noexcept(false) { +ArrowLog::~ArrowLog() { if (logging_provider_ != nullptr) { delete reinterpret_cast(logging_provider_); logging_provider_ = nullptr; diff --git a/cpp/src/arrow/util/logging.h b/cpp/src/arrow/util/logging.h index 406e5a3b749c0..2baa560563bb4 100644 --- a/cpp/src/arrow/util/logging.h +++ b/cpp/src/arrow/util/logging.h @@ -157,7 +157,7 @@ enum class ArrowLogLevel : int { // This is also a null log which does not output anything. class ARROW_EXPORT ArrowLogBase { public: - virtual ~ArrowLogBase() noexcept(false) {} + virtual ~ArrowLogBase() {} virtual bool IsEnabled() const { return false; } @@ -176,7 +176,7 @@ class ARROW_EXPORT ArrowLogBase { class ARROW_EXPORT ArrowLog : public ArrowLogBase { public: ArrowLog(const char* file_name, int line_number, ArrowLogLevel severity); - ~ArrowLog() noexcept(false) override; + ~ArrowLog() override; /// Return whether or not current logging instance is enabled. ///