]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/multiprecision/test/test_mixed_mpf_float.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / multiprecision / test / test_mixed_mpf_float.cpp
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 http://www.boost.org/LICENSE_1_
5
6 #ifdef _MSC_VER
7 # define _SCL_SECURE_NO_WARNINGS
8 #endif
9
10 #include <boost/multiprecision/gmp.hpp>
11 #include "test_mixed.hpp"
12
13 int main()
14 {
15 #ifndef BOOST_NO_EXCEPTIONS
16 try{
17 #endif
18 typedef boost::multiprecision::number<boost::multiprecision::gmp_float<100>, boost::multiprecision::et_on> big_type1;
19 typedef boost::multiprecision::number<boost::multiprecision::gmp_float<50>, boost::multiprecision::et_on> small_type1;
20 typedef boost::multiprecision::number<boost::multiprecision::gmp_float<100>, boost::multiprecision::et_off> big_type2;
21 typedef boost::multiprecision::number<boost::multiprecision::gmp_float<50>, boost::multiprecision::et_off> small_type2;
22
23 test<big_type1, small_type1>();
24 test<big_type2, small_type2>();
25 test<big_type1, small_type2>();
26 test<big_type2, small_type1>();
27 #ifndef BOOST_NO_EXCEPTIONS
28 }
29 catch(const std::exception& e)
30 {
31 std::cout << "Failed with unexpected exception: " << e.what() << std::endl;
32 return 1;
33 }
34 #endif
35 return boost::report_errors();
36 }
37