Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:59:21

0001 //  ratio_fwd.hpp  ---------------------------------------------------------------//
0002 
0003 //  Copyright 2008 Howard Hinnant
0004 //  Copyright 2008 Beman Dawes
0005 //  Copyright 2009 Vicente J. Botet Escriba
0006 
0007 //  Distributed under the Boost Software License, Version 1.0.
0008 //  See http://www.boost.org/LICENSE_1_0.txt
0009 
0010 /*
0011 
0012 This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
0013 Many thanks to Howard for making his code available under the Boost license.
0014 The original code was modified to conform to Boost conventions and to section
0015 20.4 Compile-time rational arithmetic [ratio], of the C++ committee working
0016 paper N2798.
0017 See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
0018 
0019 time2_demo contained this comment:
0020 
0021     Much thanks to Andrei Alexandrescu,
0022                    Walter Brown,
0023                    Peter Dimov,
0024                    Jeff Garland,
0025                    Terry Golubiewski,
0026                    Daniel Krugler,
0027                    Anthony Williams.
0028 */
0029 
0030 // The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio
0031 
0032 #ifndef BOOST_RATIO_RATIO_FWD_HPP
0033 #define BOOST_RATIO_RATIO_FWD_HPP
0034 
0035 #include <ratio>
0036 
0037 namespace boost
0038 {
0039 
0040 //----------------------------------------------------------------------------//
0041 //                                                                            //
0042 //              20.6 Compile-time rational arithmetic [ratio]                 //
0043 //                                                                            //
0044 //----------------------------------------------------------------------------//
0045 
0046 // ratio
0047 using std::ratio;
0048 
0049 // ratio arithmetic
0050 using std::ratio_add;
0051 using std::ratio_subtract;
0052 using std::ratio_multiply;
0053 using std::ratio_divide;
0054 
0055 // ratio comparison
0056 using std::ratio_equal;
0057 using std::ratio_not_equal;
0058 using std::ratio_less;
0059 using std::ratio_less_equal;
0060 using std::ratio_greater;
0061 using std::ratio_greater_equal;
0062 
0063 // convenience SI typedefs
0064 using std::atto;
0065 using std::femto;
0066 using std::pico;
0067 using std::nano;
0068 using std::micro;
0069 using std::milli;
0070 using std::centi;
0071 using std::deci;
0072 using std::deca;
0073 using std::hecto;
0074 using std::kilo;
0075 using std::mega;
0076 using std::giga;
0077 using std::tera;
0078 using std::peta;
0079 using std::exa;
0080 
0081 }  // namespace boost
0082 
0083 #endif  // BOOST_RATIO_RATIO_FWD_HPP