From 3f9a434e4bfa5449234fc30668ea256a52497bd5 Mon Sep 17 00:00:00 2001 From: Matt Leon Date: Tue, 7 Jan 2025 11:31:33 -0500 Subject: [PATCH] build: Upstream envoy's C++20 patch Added in https://github.com/envoyproxy/envoy/pull/32585. Required for https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/411 Signed-off-by: Matt Leon --- proxy_wasm_api.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/proxy_wasm_api.h b/proxy_wasm_api.h index 45acdb5..9f996af 100644 --- a/proxy_wasm_api.h +++ b/proxy_wasm_api.h @@ -1712,8 +1712,9 @@ struct SimpleHistogram { template struct Counter : public MetricBase { static Counter *New(std::string_view name, MetricTagDescriptor... fieldnames); - Counter(std::string_view name, MetricTagDescriptor... descriptors) - : Counter(std::string(name), std::vector({toMetricTag(descriptors)...})) { + template + Counter(std::string_view name, MetricTagDescriptor... descriptors) + : Counter(std::string(name), std::vector({toMetricTag(descriptors)...})) { } SimpleCounter resolve(Tags... f) { @@ -1763,8 +1764,9 @@ inline Counter *Counter::New(std::string_view name, template struct Gauge : public MetricBase { static Gauge *New(std::string_view name, MetricTagDescriptor... fieldnames); - Gauge(std::string_view name, MetricTagDescriptor... descriptors) - : Gauge(std::string(name), std::vector({toMetricTag(descriptors)...})) {} + template + Gauge(std::string_view name, MetricTagDescriptor... descriptors) + : Gauge(std::string(name), std::vector({toMetricTag(descriptors)...})) {} SimpleGauge resolve(Tags... f) { std::vector fields{toString(f)...}; @@ -1809,8 +1811,9 @@ inline Gauge *Gauge::New(std::string_view name, template struct Histogram : public MetricBase { static Histogram *New(std::string_view name, MetricTagDescriptor... fieldnames); - Histogram(std::string_view name, MetricTagDescriptor... descriptors) - : Histogram(std::string(name), + template + Histogram(std::string_view name, MetricTagDescriptor... descriptors) + : Histogram(std::string(name), std::vector({toMetricTag(descriptors)...})) {} SimpleHistogram resolve(Tags... f) {