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: // sl@0: // Revision History sl@0: // sl@0: // 19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola) sl@0: // 08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola) sl@0: // 04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola) sl@0: // 30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola) sl@0: // 25 Oct 2001 Initial boostification (Fernando Cacciola) sl@0: // 23 Jan 2004 Inital add to cvs (post review)s sl@0: // sl@0: #ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP sl@0: #define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP sl@0: sl@0: #include sl@0: sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) sl@0: sl@0: # include sl@0: sl@0: #else sl@0: sl@0: #include sl@0: #include sl@0: sl@0: namespace boost sl@0: { sl@0: template sl@0: inline sl@0: Target numeric_cast ( Source arg ) sl@0: { sl@0: typedef boost::numeric::converter Converter ; sl@0: return Converter::convert(arg); sl@0: } sl@0: sl@0: using numeric::bad_numeric_cast; sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif sl@0: sl@0: sl@0: #endif