Commit 951b9e15 authored by Dominik Charousset's avatar Dominik Charousset

Fix build on various compilers

parent aa64eb85
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
static constexpr bool writes_state = false; static constexpr bool writes_state = false;
template <class... Ts> template <class... Ts>
[[nodiscard]] auto operator()(Ts&&... xs) { auto operator()(Ts&&... xs) {
using result_type = typename Subtype::result_type; using result_type = typename Subtype::result_type;
if constexpr (std::is_same<result_type, void>::value) { if constexpr (std::is_same<result_type, void>::value) {
auto dummy = unit; auto dummy = unit;
......
...@@ -108,9 +108,9 @@ void append(prometheus::char_buffer& buf, char ch, Ts&&... xs) { ...@@ -108,9 +108,9 @@ void append(prometheus::char_buffer& buf, char ch, Ts&&... xs) {
template <class... Ts> template <class... Ts>
void append(prometheus::char_buffer& buf, double val, Ts&&... xs) { void append(prometheus::char_buffer& buf, double val, Ts&&... xs) {
if (isnan(val)) { if (std::isnan(val)) {
append(buf, "NaN"_sv); append(buf, "NaN"_sv);
} else if (isinf(val)) { } else if (std::isinf(val)) {
if (std::signbit(val)) if (std::signbit(val))
append(buf, "+Inf"_sv); append(buf, "+Inf"_sv);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment