Skip to content

Commit

Permalink
build: Upstream envoy's C++20 patch
Browse files Browse the repository at this point in the history
Added in envoyproxy/envoy#32585.

Required for proxy-wasm/proxy-wasm-cpp-host#411

Signed-off-by: Matt Leon <[email protected]>
  • Loading branch information
leonm1 committed Jan 7, 2025
1 parent a982ad0 commit 88a8b6f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions proxy_wasm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1712,9 +1712,9 @@ struct SimpleHistogram {
template <typename... Tags> struct Counter : public MetricBase {
static Counter<Tags...> *New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames);

Counter<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
: Counter<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {
}
template <typename... T>
Counter(std::string_view name, MetricTagDescriptor<T>... descriptors)
: Counter<T...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}

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

Gauge<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
: Gauge<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
template <typename... T>
Gauge(std::string_view name, MetricTagDescriptor<T>... descriptors)
: Gauge<T...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}

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

Histogram<Tags...>(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
: Histogram<Tags...>(std::string(name),
std::vector<MetricTag>({toMetricTag(descriptors)...})) {}
template <typename... T>
Histogram(std::string_view name, MetricTagDescriptor<T>... descriptors)
: Histogram<T...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}

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

0 comments on commit 88a8b6f

Please sign in to comment.