|
| 1 | +# Address g++ -std=c++20 variadic template compilation issue: |
| 2 | +# https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/411#issuecomment-2295429152 |
| 3 | + |
| 4 | +diff --git a/proxy_wasm_api.h b/proxy_wasm_api.h |
| 5 | +index 166b49c..263d2b9 100644 |
| 6 | +--- a/proxy_wasm_api.h |
| 7 | ++++ b/proxy_wasm_api.h |
| 8 | +@@ -1207,7 +1207,7 @@ struct SimpleHistogram { |
| 9 | + template <typename... Tags> struct Counter : public MetricBase { |
| 10 | + static Counter<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames); |
| 11 | + |
| 12 | +- Counter<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors) |
| 13 | ++ Counter(std::string_view name, MetricTagDescriptor<Tags>... descriptors) |
| 14 | + : Counter<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) { |
| 15 | + } |
| 16 | + |
| 17 | +@@ -1256,7 +1256,7 @@ inline Counter<Tags...> *Counter<Tags...>::New(std::string_view name, |
| 18 | + template <typename... Tags> struct Gauge : public MetricBase { |
| 19 | + static Gauge<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames); |
| 20 | + |
| 21 | +- Gauge<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors) |
| 22 | ++ Gauge(std::string_view name, MetricTagDescriptor<Tags>... descriptors) |
| 23 | + : Gauge<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {} |
| 24 | + |
| 25 | + SimpleGauge resolve(Tags... f) { |
| 26 | +@@ -1302,6 +1302,6 @@ inline Gauge<Tags...> *Gauge<Tags...>::New(std::string_view name, |
| 27 | + template <typename... Tags> struct Histogram : public MetricBase { |
| 28 | + static Histogram<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames); |
| 29 | + |
| 30 | +- Histogram<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors) |
| 31 | ++ Histogram(std::string_view name, MetricTagDescriptor<Tags>... descriptors) |
| 32 | + : Histogram<Tags...>(std::string(name), |
| 33 | + std::vector<MetricTag>({toMetricTag(descriptors)...})) {} |
0 commit comments