diff --git a/exporters/memory/src/in_memory_metric_data.cc b/exporters/memory/src/in_memory_metric_data.cc index 2a77e0b5a3..90f1c1450f 100644 --- a/exporters/memory/src/in_memory_metric_data.cc +++ b/exporters/memory/src/in_memory_metric_data.cc @@ -31,7 +31,9 @@ void SimpleAggregateInMemoryMetricData::Add(std::unique_ptr res const auto &metric = m.instrument_descriptor.name_; for (const auto &pda : m.point_data_attr_) { - data_[{scope, metric}].insert({pda.attributes, pda.point_data}); + // NOTE: Explicit type conversion added for C++11 (gcc 4.8) + data_[std::tuple{scope, metric}].insert( + {pda.attributes, pda.point_data}); } } } @@ -41,7 +43,8 @@ const SimpleAggregateInMemoryMetricData::AttributeToPoint &SimpleAggregateInMemo const std::string &scope, const std::string &metric) { - return data_[{scope, metric}]; + // NOTE: Explicit type conversion added for C++11 (gcc 4.8) + return data_[std::tuple{scope, metric}]; } void SimpleAggregateInMemoryMetricData::Clear() diff --git a/exporters/memory/src/in_memory_metric_exporter_factory.cc b/exporters/memory/src/in_memory_metric_exporter_factory.cc index 7f6ab83346..0deff73dcd 100644 --- a/exporters/memory/src/in_memory_metric_exporter_factory.cc +++ b/exporters/memory/src/in_memory_metric_exporter_factory.cc @@ -78,7 +78,8 @@ class InMemoryMetricExporter final : public sdk::metrics::PushMetricExporter std::unique_ptr InMemoryMetricExporterFactory::Create( const std::shared_ptr &data) { - return Create(data, [](auto) { return AggregationTemporality::kCumulative; }); + return Create(data, + [](sdk::metrics::InstrumentType) { return AggregationTemporality::kCumulative; }); } std::unique_ptr InMemoryMetricExporterFactory::Create(