From 57a10d946aa73d12ddaa78db7aa18f6926b2789a Mon Sep 17 00:00:00 2001 From: Kin Date: Sat, 21 Oct 2023 15:29:42 +0200 Subject: [PATCH] fix fpclassify problem ref: https://stackoverflow.com/questions/61646166/how-to-resolve-fpclassify-ambiguous-call-to-overloaded-function --- .github/workflows/pypi.yml | 2 +- src/timer.hpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 14542cc..2b4d79e 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - platform: [windows-latest, macos-latest] # , ubuntu-18.04 + platform: [windows-latest, macos-latest] # , ubuntu-latest python-version: ["3.x"] steps: diff --git a/src/timer.hpp b/src/timer.hpp index 6d06537..95788c2 100644 --- a/src/timer.hpp +++ b/src/timer.hpp @@ -425,7 +425,7 @@ class Timing : public Timer int longestTotal() const { - int l = (std::isnan(totalSeconds()) ? nan_gap_ : std::to_string(static_cast(totalSeconds())).length()); + int l = (std::isnan(static_cast(totalSeconds())) ? nan_gap_ : std::to_string(static_cast(totalSeconds())).length()); // int l = std::to_string(static_cast(totalSeconds())).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestTotal()); @@ -435,7 +435,7 @@ class Timing : public Timer int longestLast() const { - int l = (std::isnan(lastSeconds()) ? nan_gap_ : std::to_string(static_cast(lastSeconds())).length()); + int l = (std::isnan(static_cast(lastSeconds())) ? nan_gap_ : std::to_string(static_cast(lastSeconds())).length()); // int l = std::to_string(static_cast(lastSeconds())).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestLast()); @@ -445,7 +445,7 @@ class Timing : public Timer int longestMean() const { - int l = (std::isnan(meanSeconds()) ? nan_gap_ : std::to_string(static_cast(meanSeconds())).length()); + int l = (std::isnan(static_cast(meanSeconds())) ? nan_gap_ : std::to_string(static_cast(meanSeconds())).length()); // int l = std::to_string(static_cast(meanSeconds())).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestMean()); @@ -455,7 +455,7 @@ class Timing : public Timer int longestStd() const { - int l = (std::isnan(stdSeconds()) ? nan_gap_ : std::to_string(static_cast(stdSeconds())).length()); + int l = (std::isnan(static_cast(stdSeconds())) ? nan_gap_ : std::to_string(static_cast(stdSeconds())).length()); // int l = std::to_string(static_cast(stdSeconds())).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestStd()); @@ -465,7 +465,7 @@ class Timing : public Timer int longestMin() const { - int l = (std::isnan(minSeconds()) ? nan_gap_ : std::to_string(static_cast(minSeconds())).length()); + int l = (std::isnan(static_cast(minSeconds())) ? nan_gap_ : std::to_string(static_cast(minSeconds())).length()); // int l = std::to_string(static_cast(minSeconds())).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestMin()); @@ -475,7 +475,7 @@ class Timing : public Timer int longestMax() const { - int l = (std::isnan(maxSeconds()) ? nan_gap_ : std::to_string(static_cast(maxSeconds())).length()); + int l = (std::isnan(static_cast(maxSeconds())) ? nan_gap_ : std::to_string(static_cast(maxSeconds())).length()); // int l = std::to_string(static_cast(maxSeconds())).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestMax()); @@ -485,7 +485,7 @@ class Timing : public Timer int longestSteps() const { - int l = (std::isnan(numSamples()) ? nan_gap_ : std::to_string(static_cast(numSamples())).length()); + int l = (std::isnan(static_cast(numSamples())) ? nan_gap_ : std::to_string(static_cast(numSamples())).length()); // int l = std::to_string(numSamples()).length(); for (auto const& [_, t] : timer_) { l = std::max(l, t.longestSteps());