Skip to content

Commit 4f53e7a

Browse files
authored
build: Upstream envoy's C++20 patch (#181)
Added in envoyproxy/envoy#32585. Required for proxy-wasm/proxy-wasm-cpp-host#411 Signed-off-by: Matt Leon <[email protected]>
1 parent a982ad0 commit 4f53e7a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

proxy_wasm_api.h

+9-8
Original file line numberDiff line numberDiff line change
@@ -1712,9 +1712,9 @@ struct SimpleHistogram {
17121712
template <typename... Tags> struct Counter : public MetricBase {
17131713
static Counter<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames);
17141714

1715-
Counter<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
1716-
: Counter<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {
1717-
}
1715+
template <typename... T>
1716+
Counter(std::string_view name, MetricTagDescriptor<T>... descriptors)
1717+
: Counter<T...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
17181718

17191719
SimpleCounter resolve(Tags... f) {
17201720
std::vector<std::string> fields{toString(f)...};
@@ -1763,8 +1763,9 @@ inline Counter<Tags...> *Counter<Tags...>::New(std::string_view name,
17631763
template <typename... Tags> struct Gauge : public MetricBase {
17641764
static Gauge<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames);
17651765

1766-
Gauge<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
1767-
: Gauge<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
1766+
template <typename... T>
1767+
Gauge(std::string_view name, MetricTagDescriptor<T>... descriptors)
1768+
: Gauge<T...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
17681769

17691770
SimpleGauge resolve(Tags... f) {
17701771
std::vector<std::string> fields{toString(f)...};
@@ -1809,9 +1810,9 @@ inline Gauge<Tags...> *Gauge<Tags...>::New(std::string_view name,
18091810
template <typename... Tags> struct Histogram : public MetricBase {
18101811
static Histogram<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames);
18111812

1812-
Histogram<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
1813-
: Histogram<Tags...>(std::string(name),
1814-
std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
1813+
template <typename... T>
1814+
Histogram(std::string_view name, MetricTagDescriptor<T>... descriptors)
1815+
: Histogram<T...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
18151816

18161817
SimpleHistogram resolve(Tags... f) {
18171818
std::vector<std::string> fields{toString(f)...};

0 commit comments

Comments
 (0)