sl@0: // © Copyright Fernando Luis Cacciola Carballal 2000-2004 sl@0: // Use, modification, and distribution is subject to the Boost Software sl@0: // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: // See library home page at http://www.boost.org/libs/numeric/conversion sl@0: // sl@0: // Contact the author at: fernando_cacciola@hotmail.com sl@0: // sl@0: #ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP sl@0: #define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP sl@0: sl@0: #include "boost/numeric/conversion/conversion_traits.hpp" sl@0: #include "boost/numeric/conversion/converter_policies.hpp" sl@0: sl@0: #include "boost/numeric/conversion/detail/converter.hpp" sl@0: sl@0: namespace boost { namespace numeric sl@0: { sl@0: sl@0: template, sl@0: class OverflowHandler = def_overflow_handler, sl@0: class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> , sl@0: class RawConverter = raw_converter, sl@0: class UserRangeChecker = UseInternalRangeChecker sl@0: > sl@0: struct converter : convdetail::get_converter_impl::type sl@0: { sl@0: typedef Traits traits ; sl@0: sl@0: typedef typename Traits::argument_type argument_type ; sl@0: typedef typename Traits::result_type result_type ; sl@0: sl@0: result_type operator() ( argument_type s ) const { return this->convert(s) ; } sl@0: } ; sl@0: sl@0: sl@0: sl@0: template , sl@0: class UserRangeChecker = UseInternalRangeChecker sl@0: > sl@0: struct make_converter_from sl@0: { sl@0: template, sl@0: class RawConverter = raw_converter sl@0: > sl@0: struct to sl@0: { sl@0: typedef converter type ; sl@0: } ; sl@0: sl@0: } ; sl@0: sl@0: } } // namespace boost::numeric sl@0: sl@0: #endif sl@0: sl@0: