From 88a8b6fcf1f1bc9f8eef4744338f65b269027b3c 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 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/proxy_wasm_api.h b/proxy_wasm_api.h index 45acdb5..f9f49b8 100644 --- a/proxy_wasm_api.h +++ b/proxy_wasm_api.h @@ -1712,9 +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) { std::vector fields{toString(f)...}; @@ -1763,8 +1763,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,9 +1810,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), - std::vector({toMetricTag(descriptors)...})) {} + template + Histogram(std::string_view name, MetricTagDescriptor... descriptors) + : Histogram(std::string(name), std::vector({toMetricTag(descriptors)...})) {} SimpleHistogram resolve(Tags... f) { std::vector fields{toString(f)...};