]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/ratio/example/display_ex.cpp
1 // io_ex2.cpp ----------------------------------------------------------//
3 // Copyright 2010 Howard Hinnant
4 // Copyright 2010 Vicente J. Botet Escriba
6 // Distributed under the Boost Software License, Version 1.0.
7 // See http://www.boost.org/LICENSE_1_0.txt
10 This code was adapted by Vicente J. Botet Escriba from Hinnant's html documentation.
11 Many thanks to Howard for making his code available under the Boost license.
15 #include <boost/ratio/ratio_io.hpp>
20 using namespace boost
;
22 cout
<< "ratio_string<deca, char>::prefix() = "
23 << ratio_string
<boost::deca
, char>::prefix() << '\n';
24 cout
<< "ratio_string<deca, char>::symbol() = "
25 << ratio_string
<boost::deca
, char>::symbol() << '\n';
27 cout
<< "ratio_string<giga, char>::prefix() = "
28 << ratio_string
<boost::giga
, char>::prefix() << '\n';
29 cout
<< "ratio_string<giga, char>::symbol() = "
30 << ratio_string
<boost::giga
, char>::symbol() << '\n';
32 cout
<< "ratio_string<ratio<4, 6>, char>::prefix() = "
33 << ratio_string
<boost::ratio
<4, 6>, char>::prefix() << '\n';
34 cout
<< "ratio_string<ratio<4, 6>, char>::symbol() = "
35 << ratio_string
<boost::ratio
<4, 6>, char>::symbol() << '\n';