/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2010-2019 Danny Robson */ #include "./validate.hpp" #include #include /////////////////////////////////////////////////////////////////////////////// template <> bool cruft::debug::validator::is_valid (const float &val) noexcept { return !std::isnan (val); } //----------------------------------------------------------------------------- template <> bool cruft::debug::validator::is_valid (const double &val) noexcept { return !std::isnan (val); } /////////////////////////////////////////////////////////////////////////////// #include //----------------------------------------------------------------------------- #define INSTANTIATE(KLASS) \ template <> \ struct cruft::debug::validator { \ static bool is_valid(KLASS const&); \ }; \ \ bool \ cruft::debug::validator::is_valid(KLASS const&) \ { \ return true; \ } //----------------------------------------------------------------------------- MAP0(INSTANTIATE, u08, u16, u32, u64, i08, i16, i32, i64, char )