Boost.Ratio/Chrono: Added boost/ratio/include.hpp file and make use of boost/ratio/ratio.hpp when all the files are not needed
[SVN r68183]
This commit is contained in:
parent
2326d1b80b
commit
27841a060c
@ -40,7 +40,7 @@ time2_demo contained this comment:
|
||||
|
||||
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/type_traits/common_type.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
|
@ -7,7 +7,7 @@
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <iostream>
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include "duration.hpp"
|
||||
|
||||
namespace User1
|
||||
|
@ -9,6 +9,6 @@
|
||||
#ifndef BOOST_RATIO_HPP
|
||||
#define BOOST_RATIO_HPP
|
||||
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/include.hpp>
|
||||
|
||||
#endif // BOOST_RATIO_HPP
|
||||
|
15
include/boost/ratio/include.hpp
Normal file
15
include/boost/ratio/include.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
// include.hpp ---------------------------------------------------------------//
|
||||
|
||||
// Copyright 2011 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_RATIO_INCLUDE_HPP
|
||||
#define BOOST_RATIO_INCLUDE_HPP
|
||||
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/ratio_io.hpp>
|
||||
#include <boost/ratio/mpl/rational_constant.hpp>
|
||||
|
||||
#endif // BOOST_RATIO_INCLUDE_HPP
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_ABS_HPP
|
||||
#define BOOST_RATIO_MPL_ABS_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/ratio/detail/mpl/abs.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_DIVIDES_HPP
|
||||
#define BOOST_RATIO_MPL_DIVIDES_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/divides.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_EQUAL_TO_HPP
|
||||
#define BOOST_RATIO_MPL_EQUAL_TO_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_GCD_HPP
|
||||
#define BOOST_RATIO_MPL_GCD_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/ratio/detail/mpl/gcd.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_GREATER_HPP
|
||||
#define BOOST_RATIO_MPL_GREATER_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/greater.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_GREATER_EQUAL_HPP
|
||||
#define BOOST_RATIO_MPL_GREATER_EQUAL_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/greater_equal.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_LCM_HPP
|
||||
#define BOOST_RATIO_MPL_LCM_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/ratio/detail/mpl/lcm.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_LESS_HPP
|
||||
#define BOOST_RATIO_MPL_LESS_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/less.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_LESS_EQUAL_HPP
|
||||
#define BOOST_RATIO_MPL_LESS_EQUAL_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/less_equal.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_MINUS_HPP
|
||||
#define BOOST_RATIO_MPL_MINUS_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/minus.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_NEGATE_HPP
|
||||
#define BOOST_RATIO_MPL_NEGATE_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/negate.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_NOT_EQUAL_TO_HPP
|
||||
#define BOOST_RATIO_MPL_NOT_EQUAL_TO_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/not_equal_to.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_NUMERIC_CAST_HPP
|
||||
#define BOOST_RATIO_MPL_NUMERIC_CAST_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/numeric_cast.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_PLUS_HPP
|
||||
#define BOOST_RATIO_MPL_PLUS_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/plus.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_SIGN_HPP
|
||||
#define BOOST_RATIO_MPL_SIGN_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/ratio/detail/mpl/sign.hpp>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef BOOST_RATIO_MPL_TIMES_HPP
|
||||
#define BOOST_RATIO_MPL_TIMES_HPP
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/ratio/mpl/numeric_cast.hpp>
|
||||
#include <boost/mpl/times.hpp>
|
||||
|
||||
|
@ -34,7 +34,7 @@ struct ratio_string
|
||||
*/
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
|
@ -33,7 +33,7 @@ struct ratio_static_string
|
||||
*/
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/static_string/basic_str.hpp>
|
||||
//#include <sstream>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
|
||||
template <typename R>
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
template <typename T, typename R>
|
||||
struct S {
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/integer_traits.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_add
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_divide
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
|
||||
typedef boost::ratio<1,2> R2;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_divide
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_multiply
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
|
||||
typedef boost::ratio<2,1> R2;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_multiply
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_subtract
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
typedef boost::ratio<BOOST_RATIO_INTMAX_C(-0x7FFFFFFFFFFFFFFF), 1> R1;
|
||||
typedef boost::ratio<1,1> R2;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_subtract
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio_equal
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
// test ratio: equivalent ratios convert with BOOST_RATIO_EXTENSIONS
|
||||
|
||||
#define BOOST_RATIO_EXTENSIONS
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
boost::intmax_t func(boost::ratio<5,6> s);
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
// test ratio: The template argument D mus not be zero
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
void test()
|
||||
|
@ -14,7 +14,7 @@
|
||||
// test ratio: the absolute values of the template arguments N and D
|
||||
// must be representable by type intmax_t.
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
void test()
|
||||
|
@ -14,7 +14,7 @@
|
||||
// test ratio: the absolute values of the template arguments N and D
|
||||
// must be representable by type intmax_t.
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
void test()
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
//#define BOOST_RATIO_EXTENSIONS
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
boost::intmax_t func(boost::ratio<5,6> const& s) {
|
||||
return s.num;
|
||||
|
@ -14,7 +14,7 @@
|
||||
// test ratio: The static data members num and den shall have thcommon
|
||||
// divisor of the absolute values of N and D:
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
#include <iostream>
|
||||
|
||||
typedef boost::ratio<5, 3> five_thirds; // five_thirds::num == 5, five_thirds::den == 3
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
// test ratio typedef's
|
||||
|
||||
#include <boost/ratio.hpp>
|
||||
#include <boost/ratio/ratio.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_STATIC_ASSERT)
|
||||
#define NOTHING ""
|
||||
|
Loading…
Reference in New Issue
Block a user