1 ///////////////////////////////////////////////////////////////
2 // Copyright 2012 John Maddock. Distributed under the Boost
3 // Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt
8 #define _SCL_SECURE_NO_WARNINGS
11 #include <boost/detail/lightweight_test.hpp>
12 #include <boost/array.hpp>
15 #include <boost/multiprecision/cpp_dec_float.hpp>
19 using namespace boost::multiprecision;
21 // Test interconversions between different precisions:
23 cpp_dec_float_50 f1(2);
24 cpp_dec_float_100 f2(3);
26 cpp_dec_float_100 f3 = f1; // implicit conversion OK
28 cpp_dec_float_50 f4(f2); // explicit conversion OK
34 f1 = static_cast<cpp_dec_float_50>(f2);
37 return boost::report_errors();