1 /*============================================================================= 2 Copyright (c) 2001-2011 Joel de Guzman 3 Copyright (c) 2001-2011 Hartmut Kaiser 4 http://spirit.sourceforge.net/ 5 6 Distributed under the Boost Software License, Version 1.0. (See accompanying 7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 =============================================================================*/ 9 #ifndef BOOST_SPIRIT_SUPPORT_DETAIL_SIGN_HPP 10 #define BOOST_SPIRIT_SUPPORT_DETAIL_SIGN_HPP 11 12 #if defined(_MSC_VER) 13 #pragma once 14 #endif 15 16 #include <boost/math/special_functions/sign.hpp> 17 18 namespace boost { namespace spirit { namespace detail 19 { 20 template<typename T> 21 inline bool (signbit)(T x) 22 { 23 return (boost::math::signbit)(x) ? true : false; 24 } 25 26 template<typename T> T(changesign)27 inline T (changesign)(T x) 28 { 29 return (boost::math::changesign)(x); 30 } 31 32 }}} 33 34 #endif 35