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)...};