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