From 0dc29a780cd5e1611f28b6316521041b1d9ec7b1 Mon Sep 17 00:00:00 2001 From: Mats Taraldsvik Date: Tue, 2 Jul 2024 13:47:08 +0200 Subject: [PATCH 1/2] Fix references in AttributeValueVisitor --- .../include/opentelemetry/exporters/ostream/common_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h b/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h index ec1ee2d367..519ec2cbf1 100644 --- a/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h +++ b/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h @@ -87,7 +87,7 @@ class AttributeValueVisitor print_value(arg, sout_); } - void operator()(const nostd::string_view &&arg) { sout_.write(arg.data(), arg.size()); } + void operator()(const nostd::string_view &arg) { sout_.write(arg.data(), arg.size()); } private: std::ostream &sout_; From ca0c2f4fceeff266ca3710ad3008b35e339659b2 Mon Sep 17 00:00:00 2001 From: Mats Taraldsvik Date: Tue, 2 Jul 2024 13:52:59 +0200 Subject: [PATCH 2/2] Update common_utils.h --- .../include/opentelemetry/exporters/ostream/common_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h b/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h index 519ec2cbf1..ec860794f0 100644 --- a/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h +++ b/exporters/ostream/include/opentelemetry/exporters/ostream/common_utils.h @@ -87,7 +87,7 @@ class AttributeValueVisitor print_value(arg, sout_); } - void operator()(const nostd::string_view &arg) { sout_.write(arg.data(), arg.size()); } + void operator()(nostd::string_view &&arg) { sout_.write(arg.data(), arg.size()); } private: std::ostream &sout_;