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:
Vicente J. Botet Escriba 2011-01-16 12:07:26 +00:00
parent 2326d1b80b
commit 27841a060c
46 changed files with 60 additions and 45 deletions

View File

@ -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>

View File

@ -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

View File

@ -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

View 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

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -34,7 +34,7 @@ struct ratio_string
*/
#include <boost/config.hpp>
#include <boost/ratio.hpp>
#include <boost/ratio/ratio.hpp>
#include <string>
#include <sstream>

View File

@ -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>

View File

@ -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>

View File

@ -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 {

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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;

View File

@ -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 ""

View File

@ -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

View File

@ -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 ""