1 /* 2 * Created by Martin on 17/11/2017. 3 * 4 * Distributed under the Boost Software License, Version 1.0. (See accompanying 5 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 */ 7 8 #include "catch_polyfills.hpp" 9 10 #include <cmath> 11 12 namespace Catch { 13 14 #if !defined(CATCH_CONFIG_POLYFILL_ISNAN) isnan(float f)15 bool isnan(float f) { 16 return std::isnan(f); 17 } isnan(double d)18 bool isnan(double d) { 19 return std::isnan(d); 20 } 21 #else 22 // For now we only use this for embarcadero 23 bool isnan(float f) { 24 return std::_isnan(f); 25 } 26 bool isnan(double d) { 27 return std::_isnan(d); 28 } 29 #endif 30 31 } // end namespace Catch 32