Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r79989 - in trunk/boost/ratio: . detail
From: vicente.botet_at_[hidden]
Date: 2012-08-12 14:51:09


Author: viboes
Date: 2012-08-12 14:51:08 EDT (Sun, 12 Aug 2012)
New Revision: 79989
URL: http://svn.boost.org/trac/boost/changeset/79989

Log:
Ratio: fixes for inspection report
Text files modified:
   trunk/boost/ratio/detail/overflow_helpers.hpp | 4 +-
   trunk/boost/ratio/ratio.hpp | 52 ++++++++++++++--------------
   trunk/boost/ratio/ratio_io.hpp | 70 ++++++++++++++++++++--------------------
   trunk/boost/ratio/ratio_static_string.hpp | 8 ++--
   4 files changed, 67 insertions(+), 67 deletions(-)

Modified: trunk/boost/ratio/detail/overflow_helpers.hpp
==============================================================================
--- trunk/boost/ratio/detail/overflow_helpers.hpp (original)
+++ trunk/boost/ratio/detail/overflow_helpers.hpp 2012-08-12 14:51:08 EDT (Sun, 12 Aug 2012)
@@ -44,7 +44,7 @@
 
 #define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL)
 
-#if !defined(BOOST_NO_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT)
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT)
 #define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
 #define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
 #define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
@@ -54,7 +54,7 @@
 #define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
 #endif
 
-#ifndef BOOST_NO_STATIC_ASSERT
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
 #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
 #elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
 #include <boost/static_assert.hpp>

Modified: trunk/boost/ratio/ratio.hpp
==============================================================================
--- trunk/boost/ratio/ratio.hpp (original)
+++ trunk/boost/ratio/ratio.hpp 2012-08-12 14:51:08 EDT (Sun, 12 Aug 2012)
@@ -46,7 +46,7 @@
 #include <boost/integer_traits.hpp>
 #include <boost/ratio/ratio_fwd.hpp>
 #include <boost/ratio/detail/overflow_helpers.hpp>
-#ifdef BOOST_RATIO_EXTENSIONS
+#ifdef BOOST_RATIO_EXTENSIONS
 #include <boost/rational.hpp>
 #include <boost/ratio/mpl/rational_c_tag.hpp>
 #endif
@@ -72,7 +72,7 @@
 // 20.6.1 Class template ratio [ratio.ratio] //
 // //
 //----------------------------------------------------------------------------//
-
+
 template <boost::intmax_t N, boost::intmax_t D>
 class ratio
 {
@@ -88,12 +88,12 @@
     BOOST_STATIC_CONSTEXPR boost::intmax_t num = SIGN_N * ABS_N / GCD;
     BOOST_STATIC_CONSTEXPR boost::intmax_t den = ABS_D / GCD;
 
-#ifdef BOOST_RATIO_EXTENSIONS
+#ifdef BOOST_RATIO_EXTENSIONS
     typedef mpl::rational_c_tag tag;
     typedef boost::rational<boost::intmax_t> value_type;
     typedef boost::intmax_t num_type;
     typedef boost::intmax_t den_type;
- ratio()
+ ratio()
     {}
     template <boost::intmax_t _N2, boost::intmax_t _D2>
     ratio(const ratio<_N2, _D2>&,
@@ -101,7 +101,7 @@
             <
                 (ratio<_N2, _D2>::num == num &&
                 ratio<_N2, _D2>::den == den)
- >::type* = 0)
+ >::type* = 0)
     {}
 
     template <boost::intmax_t _N2, boost::intmax_t _D2>
@@ -112,14 +112,14 @@
             ratio&
>::type
     operator=(const ratio<_N2, _D2>&) {return *this;}
-
+
     static value_type value() {return value_type(num,den);}
     value_type operator()() const {return value();}
 #endif
     typedef ratio<num, den> type;
 };
 
-#if defined(BOOST_NO_CONSTEXPR)
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
 template <boost::intmax_t N, boost::intmax_t D>
 const boost::intmax_t ratio<N, D>::num;
 template <boost::intmax_t N, boost::intmax_t D>
@@ -133,26 +133,26 @@
 //----------------------------------------------------------------------------//
 
 template <class R1, class R2>
-struct ratio_add
-: boost::ratio_detail::ratio_add<R1, R2>::type
+struct ratio_add
+: boost::ratio_detail::ratio_add<R1, R2>::type
 {
 };
 
 template <class R1, class R2>
 struct ratio_subtract
-: boost::ratio_detail::ratio_subtract<R1, R2>::type
+: boost::ratio_detail::ratio_subtract<R1, R2>::type
 {
 };
 
 template <class R1, class R2>
 struct ratio_multiply
-: boost::ratio_detail::ratio_multiply<R1, R2>::type
+: boost::ratio_detail::ratio_multiply<R1, R2>::type
 {
 };
 
 template <class R1, class R2>
 struct ratio_divide
-: boost::ratio_detail::ratio_divide<R1, R2>::type
+: boost::ratio_detail::ratio_divide<R1, R2>::type
 {
 };
 
@@ -167,46 +167,46 @@
 template <class R1, class R2>
 struct ratio_equal
     : public boost::integral_constant<bool,
- (R1::num == R2::num && R1::den == R2::den)>
+ (R1::num == R2::num && R1::den == R2::den)>
 {};
 
 template <class R1, class R2>
 struct ratio_not_equal
- : public boost::integral_constant<bool, !ratio_equal<R1, R2>::value>
+ : public boost::integral_constant<bool, !ratio_equal<R1, R2>::value>
 {};
 
 // ratio_less
 
 template <class R1, class R2>
 struct ratio_less
- : boost::integral_constant<bool, boost::ratio_detail::ratio_less<R1, R2>::value>
+ : boost::integral_constant<bool, boost::ratio_detail::ratio_less<R1, R2>::value>
 {};
 
 template <class R1, class R2>
 struct ratio_less_equal
- : boost::integral_constant<bool, !ratio_less<R2, R1>::value>
+ : boost::integral_constant<bool, !ratio_less<R2, R1>::value>
 {};
 
 template <class R1, class R2>
 struct ratio_greater
- : boost::integral_constant<bool, ratio_less<R2, R1>::value>
+ : boost::integral_constant<bool, ratio_less<R2, R1>::value>
 {};
 
 template <class R1, class R2>
 struct ratio_greater_equal
- : boost::integral_constant<bool, !ratio_less<R1, R2>::value>
+ : boost::integral_constant<bool, !ratio_less<R1, R2>::value>
 {};
 
 template <class R1, class R2>
-struct ratio_gcd :
+struct ratio_gcd :
     ratio<mpl::gcd_c<boost::intmax_t, R1::num, R2::num>::value,
- mpl::lcm_c<boost::intmax_t, R1::den, R2::den>::value>::type
+ mpl::lcm_c<boost::intmax_t, R1::den, R2::den>::value>::type
 {
 };
-
-#ifdef BOOST_RATIO_EXTENSIONS
+
+#ifdef BOOST_RATIO_EXTENSIONS
 template <class R>
-struct ratio_negate
+struct ratio_negate
     : ratio<-R::num, R::den>::type
 {
 };
@@ -221,12 +221,12 @@
 {
 };
 template <class R1, class R2>
-struct ratio_lcm :
+struct ratio_lcm :
     ratio<mpl::lcm_c<boost::intmax_t, R1::num, R2::num>::value,
- mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value>::type
+ mpl::gcd_c<boost::intmax_t, R1::den, R2::den>::value>::type
 {
 };
-#endif
+#endif
 } // namespace boost
 
 

Modified: trunk/boost/ratio/ratio_io.hpp
==============================================================================
--- trunk/boost/ratio/ratio_io.hpp (original)
+++ trunk/boost/ratio/ratio_io.hpp 2012-08-12 14:51:08 EDT (Sun, 12 Aug 2012)
@@ -6,7 +6,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 //
-// This code was adapted by Vicente from Howard Hinnant's experimental work
+// This code was adapted by Vicente from Howard Hinnant's experimental work
 // on chrono i/o under lvm/libc++ to Boost
 
 #ifndef BOOST_RATIO_RATIO_IO_HPP
@@ -44,8 +44,8 @@
 #include <boost/static_string/static_string.hpp>
 #endif
 
-#if defined(BOOST_NO_UNICODE_LITERALS) || defined(BOOST_NO_CHAR16_T) || defined(BOOST_NO_CHAR32_T)
-//~ #define BOOST_RATIO_HAS_UNICODE_SUPPORT
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
+//~ #define BOOST_RATIO_HAS_UNICODE_SUPPORT
 #else
 #define BOOST_RATIO_HAS_UNICODE_SUPPORT 1
 #endif
@@ -107,8 +107,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<atto, CharT> :
- ratio_detail::ratio_string_static<atto,CharT>
+struct ratio_string<atto, CharT> :
+ ratio_detail::ratio_string_static<atto,CharT>
 {};
 
 #else
@@ -165,8 +165,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<femto, CharT> :
- ratio_detail::ratio_string_static<femto,CharT>
+struct ratio_string<femto, CharT> :
+ ratio_detail::ratio_string_static<femto,CharT>
 {};
 
 #else
@@ -224,8 +224,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<pico, CharT> :
- ratio_detail::ratio_string_static<pico,CharT>
+struct ratio_string<pico, CharT> :
+ ratio_detail::ratio_string_static<pico,CharT>
 {};
 
 #else
@@ -282,8 +282,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<nano, CharT> :
- ratio_detail::ratio_string_static<nano,CharT>
+struct ratio_string<nano, CharT> :
+ ratio_detail::ratio_string_static<nano,CharT>
 {};
 
 #else
@@ -340,8 +340,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<micro, CharT> :
- ratio_detail::ratio_string_static<micro,CharT>
+struct ratio_string<micro, CharT> :
+ ratio_detail::ratio_string_static<micro,CharT>
 {};
 
 #else
@@ -398,8 +398,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<milli, CharT> :
- ratio_detail::ratio_string_static<milli,CharT>
+struct ratio_string<milli, CharT> :
+ ratio_detail::ratio_string_static<milli,CharT>
 {};
 
 #else
@@ -456,8 +456,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<centi, CharT> :
- ratio_detail::ratio_string_static<centi,CharT>
+struct ratio_string<centi, CharT> :
+ ratio_detail::ratio_string_static<centi,CharT>
 {};
 
 #else
@@ -514,8 +514,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<deci, CharT> :
- ratio_detail::ratio_string_static<deci,CharT>
+struct ratio_string<deci, CharT> :
+ ratio_detail::ratio_string_static<deci,CharT>
 {};
 
 #else
@@ -580,8 +580,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<deca, CharT> :
- ratio_detail::ratio_string_static<deca,CharT>
+struct ratio_string<deca, CharT> :
+ ratio_detail::ratio_string_static<deca,CharT>
 {};
 
 #else
@@ -639,8 +639,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<hecto, CharT> :
- ratio_detail::ratio_string_static<hecto,CharT>
+struct ratio_string<hecto, CharT> :
+ ratio_detail::ratio_string_static<hecto,CharT>
 {};
 
 #else
@@ -697,8 +697,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<kilo, CharT> :
- ratio_detail::ratio_string_static<kilo,CharT>
+struct ratio_string<kilo, CharT> :
+ ratio_detail::ratio_string_static<kilo,CharT>
 {};
 
 #else
@@ -755,8 +755,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<mega, CharT> :
- ratio_detail::ratio_string_static<mega,CharT>
+struct ratio_string<mega, CharT> :
+ ratio_detail::ratio_string_static<mega,CharT>
 {};
 
 #else
@@ -814,8 +814,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<giga, CharT> :
- ratio_detail::ratio_string_static<giga,CharT>
+struct ratio_string<giga, CharT> :
+ ratio_detail::ratio_string_static<giga,CharT>
 {};
 
 #else
@@ -873,8 +873,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<tera, CharT> :
- ratio_detail::ratio_string_static<tera,CharT>
+struct ratio_string<tera, CharT> :
+ ratio_detail::ratio_string_static<tera,CharT>
 {};
 
 #else
@@ -932,8 +932,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<peta, CharT> :
- ratio_detail::ratio_string_static<peta,CharT>
+struct ratio_string<peta, CharT> :
+ ratio_detail::ratio_string_static<peta,CharT>
 {};
 
 #else
@@ -990,8 +990,8 @@
 
 #ifdef BOOST_RATIO_HAS_STATIC_STRING
 template <typename CharT>
-struct ratio_string<exa, CharT> :
- ratio_detail::ratio_string_static<exa,CharT>
+struct ratio_string<exa, CharT> :
+ ratio_detail::ratio_string_static<exa,CharT>
 {};
 
 #else

Modified: trunk/boost/ratio/ratio_static_string.hpp
==============================================================================
--- trunk/boost/ratio/ratio_static_string.hpp (original)
+++ trunk/boost/ratio/ratio_static_string.hpp 2012-08-12 14:51:08 EDT (Sun, 12 Aug 2012)
@@ -5,7 +5,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt).
 //
-// This code was adapted by Vicente from Howard Hinnant's experimental work
+// This code was adapted by Vicente from Howard Hinnant's experimental work
 // on chrono i/o under lvm/libc++ to Boost
 
 #ifndef BOOST_RATIO_RATIO_STATIC_STRING_HPP
@@ -38,14 +38,14 @@
 //#include <sstream>
 
 
-#if defined(BOOST_NO_UNICODE_LITERALS) || defined(BOOST_NO_CHAR16_T) || defined(BOOST_NO_CHAR32_T)
-//~ #define BOOST_RATIO_HAS_UNICODE_SUPPORT
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
+//~ #define BOOST_RATIO_HAS_UNICODE_SUPPORT
 #else
 #define BOOST_RATIO_HAS_UNICODE_SUPPORT 1
 #endif
 
 namespace boost {
-
+
 template <class Ratio, class CharT>
 struct ratio_static_string;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk