Skip to content

Commit ad60fd4

Browse files
committed
Fix compiling problems for gcc 4.8
1 parent 70ed9bc commit ad60fd4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

exporters/memory/src/in_memory_metric_data.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ void SimpleAggregateInMemoryMetricData::Add(std::unique_ptr<ResourceMetrics> res
3131
const auto &metric = m.instrument_descriptor.name_;
3232
for (const auto &pda : m.point_data_attr_)
3333
{
34-
data_[{scope, metric}].insert({pda.attributes, pda.point_data});
34+
data_[std::tuple<std::string, std::string>{scope, metric}].insert(
35+
{pda.attributes, pda.point_data});
3536
}
3637
}
3738
}
@@ -41,7 +42,7 @@ const SimpleAggregateInMemoryMetricData::AttributeToPoint &SimpleAggregateInMemo
4142
const std::string &scope,
4243
const std::string &metric)
4344
{
44-
return data_[{scope, metric}];
45+
return data_[std::tuple<std::string, std::string>{scope, metric}];
4546
}
4647

4748
void SimpleAggregateInMemoryMetricData::Clear()

exporters/memory/src/in_memory_metric_exporter_factory.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class InMemoryMetricExporter final : public sdk::metrics::PushMetricExporter
7878
std::unique_ptr<PushMetricExporter> InMemoryMetricExporterFactory::Create(
7979
const std::shared_ptr<InMemoryMetricData> &data)
8080
{
81-
return Create(data, [](auto) { return AggregationTemporality::kCumulative; });
81+
return Create(data,
82+
[](sdk::metrics::InstrumentType) { return AggregationTemporality::kCumulative; });
8283
}
8384

8485
std::unique_ptr<PushMetricExporter> InMemoryMetricExporterFactory::Create(

0 commit comments

Comments
 (0)