]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/ratio/test/ratio_extensions/ratio_ext_pass.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / ratio / test / ratio_extensions / ratio_ext_pass.cpp
1 // Copyright 2011 Vicente J. Botet Escriba
2 // Distributed under the Boost Software License, Version 1.0.
3 // See http://www.boost.org/LICENSE_1_0.txt
4
5 // test ratio: equivalent ratios convert with BOOST_RATIO_EXTENSIONS
6
7 #define BOOST_RATIO_EXTENSIONS
8 #include <boost/ratio/ratio.hpp>
9 #include <boost/core/lightweight_test.hpp>
10
11 boost::intmax_t func(boost::ratio<5,6> s);
12
13 boost::intmax_t func(boost::ratio<5,6> s) {
14 return s.num;
15 }
16
17 void test();
18
19 void test() {
20 boost::ratio<10,12> r;
21 BOOST_TEST((
22 func(r)==5
23 ));
24 }
25
26 int main()
27 {
28 test();
29 return boost::report_errors();
30 }