X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Fnumeric%2Fconversion%2Fconverter.hpp;fp=boost%2Fnumeric%2Fconversion%2Fconverter.hpp;h=331caddea54450c9f60c9361caae847833aec6e4;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/numeric/conversion/converter.hpp b/boost/numeric/conversion/converter.hpp new file mode 100644 index 0000000..331cadd --- /dev/null +++ b/boost/numeric/conversion/converter.hpp @@ -0,0 +1,68 @@ +// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP + +#include "boost/numeric/conversion/conversion_traits.hpp" +#include "boost/numeric/conversion/converter_policies.hpp" + +#include "boost/numeric/conversion/detail/converter.hpp" + +namespace boost { namespace numeric +{ + +template, + class OverflowHandler = def_overflow_handler, + class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> , + class RawConverter = raw_converter, + class UserRangeChecker = UseInternalRangeChecker + > +struct converter : convdetail::get_converter_impl::type +{ + typedef Traits traits ; + + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + result_type operator() ( argument_type s ) const { return this->convert(s) ; } +} ; + + + +template , + class UserRangeChecker = UseInternalRangeChecker + > +struct make_converter_from +{ + template, + class RawConverter = raw_converter + > + struct to + { + typedef converter type ; + } ; + +} ; + +} } // namespace boost::numeric + +#endif + +