Skip to content

Commit

Permalink
Remove template type parameter clauses from constructor declarations
Browse files Browse the repository at this point in the history
This is to appease stricter checks with g++ -std=c++20, details in
[this](proxy-wasm/proxy-wasm-cpp-host#411 (comment))
and subsequent comments.

Signed-off-by: Michael Warres <mpw@google.com>
  • Loading branch information
mpwarres committed Oct 11, 2024
1 parent 6b3dc93 commit bbc13b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions proxy_wasm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ 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(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
: Counter<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {
}

Expand Down Expand Up @@ -1763,7 +1763,7 @@ 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(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
: Gauge<Tags...>(std::string(name), std::vector<MetricTag>({toMetricTag(descriptors)...})) {}

SimpleGauge resolve(Tags... f) {
Expand Down Expand Up @@ -1809,7 +1809,7 @@ 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(std::string_view name, MetricTagDescriptor<Tags>... descriptors)
: Histogram<Tags...>(std::string(name),
std::vector<MetricTag>({toMetricTag(descriptors)...})) {}

Expand Down

0 comments on commit bbc13b7

Please sign in to comment.