Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/server/admin/prometheus_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class TextFormat : public PrometheusStatsFormatter::OutputFormat {
std::is_same_v<Stats::PrimitiveGaugeSnapshot, StatType>) {
type = "gauge";
} else {
static_assert(false, "Unexpected StatsType");
static_assert(sizeof(StatType) == 0, "Unexpected StatsType");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like how this reads. How about doing

template <typename...>
inline constexpr bool always_false = false;

and

static_assert(always_false<StatType>, "Unexpected StatType");

}

generateTypeOutput(output, type, prefixed_tag_extracted_name);
Expand Down
Loading