summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /3rdParty/Boost/boost/numeric/conversion/converter.hpp
downloadswift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to '3rdParty/Boost/boost/numeric/conversion/converter.hpp')
-rw-r--r--3rdParty/Boost/boost/numeric/conversion/converter.hpp68
1 files changed, 68 insertions, 0 deletions
diff --git a/3rdParty/Boost/boost/numeric/conversion/converter.hpp b/3rdParty/Boost/boost/numeric/conversion/converter.hpp
new file mode 100644
index 0000000..331cadd
--- /dev/null
+++ b/3rdParty/Boost/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 T,
+ class S,
+ class Traits = conversion_traits<T,S>,
+ class OverflowHandler = def_overflow_handler,
+ class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> ,
+ class RawConverter = raw_converter<Traits>,
+ class UserRangeChecker = UseInternalRangeChecker
+ >
+struct converter : convdetail::get_converter_impl<Traits,
+ OverflowHandler,
+ Float2IntRounder,
+ RawConverter,
+ UserRangeChecker
+ >::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 S,
+ class OverflowHandler = def_overflow_handler,
+ class Float2IntRounder = Trunc<S> ,
+ class UserRangeChecker = UseInternalRangeChecker
+ >
+struct make_converter_from
+{
+ template<class T,
+ class Traits = conversion_traits<T,S>,
+ class RawConverter = raw_converter<Traits>
+ >
+ struct to
+ {
+ typedef converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker> type ;
+ } ;
+
+} ;
+
+} } // namespace boost::numeric
+
+#endif
+
+