From 08073b6ba1772e8423eb101055af310490c06fe9 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 19 Apr 2018 20:32:30 +1000 Subject: [PATCH] debug: add is_valid for floats --- debug.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debug.cpp b/debug.cpp index ac408004..a5511f1a 100644 --- a/debug.cpp +++ b/debug.cpp @@ -101,3 +101,12 @@ debug_wait [[gnu::constructor]] (void) await_debugger (); } } + + +/////////////////////////////////////////////////////////////////////////////// +template <> +bool +util::debug::validator::is_valid (const float &val) noexcept +{ + return !std::isnan (val); +}