From b356360fba8944c70cec0558221a46a17122ec29 Mon Sep 17 00:00:00 2001 From: owent Date: Thu, 20 Jul 2023 22:15:01 +0800 Subject: [PATCH] Fix compile with clang 16 and libc++ --- .../opentelemetry/sdk/logs/simple_log_record_processor.h | 2 +- sdk/src/logs/simple_log_record_processor.cc | 2 ++ sdk/src/metrics/data/circular_buffer.cc | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/include/opentelemetry/sdk/logs/simple_log_record_processor.h b/sdk/include/opentelemetry/sdk/logs/simple_log_record_processor.h index 4bb3dab2de..8b273c6bb2 100644 --- a/sdk/include/opentelemetry/sdk/logs/simple_log_record_processor.h +++ b/sdk/include/opentelemetry/sdk/logs/simple_log_record_processor.h @@ -33,7 +33,7 @@ class SimpleLogRecordProcessor : public LogRecordProcessor public: explicit SimpleLogRecordProcessor(std::unique_ptr &&exporter); - ~SimpleLogRecordProcessor() override = default; + ~SimpleLogRecordProcessor() override; std::unique_ptr MakeRecordable() noexcept override; diff --git a/sdk/src/logs/simple_log_record_processor.cc b/sdk/src/logs/simple_log_record_processor.cc index 6514c7acff..2c33739bef 100644 --- a/sdk/src/logs/simple_log_record_processor.cc +++ b/sdk/src/logs/simple_log_record_processor.cc @@ -23,6 +23,8 @@ SimpleLogRecordProcessor::SimpleLogRecordProcessor(std::unique_ptr SimpleLogRecordProcessor::MakeRecordable() noexcept { return exporter_->MakeRecordable(); diff --git a/sdk/src/metrics/data/circular_buffer.cc b/sdk/src/metrics/data/circular_buffer.cc index 9117e67ae5..93d8fd6eeb 100644 --- a/sdk/src/metrics/data/circular_buffer.cc +++ b/sdk/src/metrics/data/circular_buffer.cc @@ -55,7 +55,7 @@ struct AdaptingIntegerArrayClear template void operator()(std::vector &backing) { - std::fill(backing.begin(), backing.end(), static_cast(0)); + backing.assign(backing.size(), static_cast(0)); } };