1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/numeric/conversion/converter.hpp Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,68 @@
1.4 +// © Copyright Fernando Luis Cacciola Carballal 2000-2004
1.5 +// Use, modification, and distribution is subject to the Boost Software
1.6 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
1.7 +// http://www.boost.org/LICENSE_1_0.txt)
1.8 +
1.9 +// See library home page at http://www.boost.org/libs/numeric/conversion
1.10 +//
1.11 +// Contact the author at: fernando_cacciola@hotmail.com
1.12 +//
1.13 +#ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
1.14 +#define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP
1.15 +
1.16 +#include "boost/numeric/conversion/conversion_traits.hpp"
1.17 +#include "boost/numeric/conversion/converter_policies.hpp"
1.18 +
1.19 +#include "boost/numeric/conversion/detail/converter.hpp"
1.20 +
1.21 +namespace boost { namespace numeric
1.22 +{
1.23 +
1.24 +template<class T,
1.25 + class S,
1.26 + class Traits = conversion_traits<T,S>,
1.27 + class OverflowHandler = def_overflow_handler,
1.28 + class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> ,
1.29 + class RawConverter = raw_converter<Traits>,
1.30 + class UserRangeChecker = UseInternalRangeChecker
1.31 + >
1.32 +struct converter : convdetail::get_converter_impl<Traits,
1.33 + OverflowHandler,
1.34 + Float2IntRounder,
1.35 + RawConverter,
1.36 + UserRangeChecker
1.37 + >::type
1.38 +{
1.39 + typedef Traits traits ;
1.40 +
1.41 + typedef typename Traits::argument_type argument_type ;
1.42 + typedef typename Traits::result_type result_type ;
1.43 +
1.44 + result_type operator() ( argument_type s ) const { return this->convert(s) ; }
1.45 +} ;
1.46 +
1.47 +
1.48 +
1.49 +template<class S,
1.50 + class OverflowHandler = def_overflow_handler,
1.51 + class Float2IntRounder = Trunc<S> ,
1.52 + class UserRangeChecker = UseInternalRangeChecker
1.53 + >
1.54 +struct make_converter_from
1.55 +{
1.56 + template<class T,
1.57 + class Traits = conversion_traits<T,S>,
1.58 + class RawConverter = raw_converter<Traits>
1.59 + >
1.60 + struct to
1.61 + {
1.62 + typedef converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker> type ;
1.63 + } ;
1.64 +
1.65 +} ;
1.66 +
1.67 +} } // namespace boost::numeric
1.68 +
1.69 +#endif
1.70 +
1.71 +