7 #ifndef __FWTOOLS_NUMERICROUNDCAST_HXX__ 8 #define __FWTOOLS_NUMERICROUNDCAST_HXX__ 10 #include <boost/numeric/conversion/converter.hpp> 25 template <
typename TYPEOUT,
typename TYPEIN>
28 typedef ::boost::numeric::conversion_traits<TYPEOUT, TYPEIN> TraitsType;
29 typedef ::boost::numeric::silent_overflow_handler OverflowHandlerType;
30 typedef ::boost::numeric::RoundEven<typename TraitsType::source_type> RoundEvenType;
31 typedef ::boost::numeric::raw_converter<TraitsType> ConverterType;
32 typedef ::boost::numeric::UseInternalRangeChecker RangeCheckerType;
34 typedef ::boost::numeric::converter<
44 return RoundCastType::convert(value);
49 #endif //__FWTOOLS_NUMERICROUNDCAST_HXX__