Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80406 - in branches/release: boost/ratio boost/ratio/detail libs/ratio libs/ratio/doc libs/ratio/example libs/ratio/test libs/ratio/test/ratio_arithmetic libs/ratio/test/ratio_comparison libs/ratio/test/ratio_extensions libs/ratio/test/ratio_io libs/ratio/test/ratio_ratio
From: vicente.botet_at_[hidden]
Date: 2012-09-05 07:03:19


Author: viboes
Date: 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
New Revision: 80406
URL: http://svn.boost.org/trac/boost/changeset/80406

Log:
Ratio: merge from trunk
Added:
   branches/release/boost/ratio/config.hpp (contents, props changed)
   branches/release/boost/ratio/detail/ratio_io.hpp (contents, props changed)
Properties modified:
   branches/release/boost/ratio/ (props changed)
   branches/release/libs/ratio/ (props changed)
Text files modified:
   branches/release/boost/ratio/detail/overflow_helpers.hpp | 34 --
   branches/release/boost/ratio/ratio.hpp | 54 +-
   branches/release/boost/ratio/ratio_fwd.hpp | 9
   branches/release/boost/ratio/ratio_io.hpp | 597 ++++++++++++---------------------------
   branches/release/boost/ratio/ratio_static_string.hpp | 8
   branches/release/libs/ratio/doc/ratio.qbk | 407 ++++++++++++++++++++++----
   branches/release/libs/ratio/example/display_ex.cpp | 26
   branches/release/libs/ratio/example/duration.hpp | 40 +-
   branches/release/libs/ratio/test/Jamfile.v2 | 8
   branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp | 5
   branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_pass.cpp | 2
   branches/release/libs/ratio/test/ratio_arithmetic/ratio_divide_fail.cpp | 2
   branches/release/libs/ratio/test/ratio_arithmetic/ratio_multiply_fail.cpp | 2
   branches/release/libs/ratio/test/ratio_comparison/ratio_equal_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_comparison/ratio_greater_equal_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_comparison/ratio_greater_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_comparison/ratio_less_equal_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_comparison/ratio_less_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_comparison/ratio_not_equal_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_equal_to_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_greater_equal_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_greater_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_less_equal_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_less_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_not_equal_to_pass.cpp | 1
   branches/release/libs/ratio/test/ratio_extensions/mpl_plus_pass.cpp | 2
   branches/release/libs/ratio/test/ratio_io/ratio_io_fail.cpp | 4
   branches/release/libs/ratio/test/ratio_io/ratio_io_pass.cpp | 64 ++--
   branches/release/libs/ratio/test/ratio_ratio/ratio_pass.cpp | 9
   branches/release/libs/ratio/test/ratio_test.cpp | 2
   30 files changed, 646 insertions(+), 641 deletions(-)

Added: branches/release/boost/ratio/config.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/ratio/config.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -0,0 +1,75 @@
+// config.hpp ---------------------------------------------------------------//
+
+// Copyright 2012 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_CONFIG_HPP
+#define BOOST_RATIO_CONFIG_HPP
+
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
+
+#if !defined BOOST_RATIO_VERSION
+#define BOOST_RATIO_VERSION 1
+#else
+#if BOOST_RATIO_VERSION!=1 && BOOST_RATIO_VERSION!=2
+#error "BOOST_RATIO_VERSION must be 1 or 2"
+#endif
+#endif
+
+#if BOOST_RATIO_VERSION==1
+#if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+#define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#endif
+#endif
+
+#if BOOST_RATIO_VERSION==2
+#if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+#endif
+#endif
+
+#ifdef INTMAX_C
+#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a)
+#else
+#define BOOST_RATIO_INTMAX_C(a) a##LL
+#endif
+
+#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL)
+
+
+#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>
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
+ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#else
+//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
+#define BOOST_RATIO_CONCAT(A,B) A##B
+#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
+//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
+
+#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"
+#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
+#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
+#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
+#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
+#endif
+
+
+//#define BOOST_RATIO_EXTENSIONS
+
+#endif // header

Modified: branches/release/boost/ratio/detail/overflow_helpers.hpp
==============================================================================
--- branches/release/boost/ratio/detail/overflow_helpers.hpp (original)
+++ branches/release/boost/ratio/detail/overflow_helpers.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -32,6 +32,7 @@
 #ifndef BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP
 #define BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP
 
+#include <boost/ratio/config.hpp>
 #include <boost/ratio/detail/mpl/abs.hpp>
 #include <boost/ratio/detail/mpl/sign.hpp>
 #include <cstdlib>
@@ -42,35 +43,6 @@
 #include <boost/utility/enable_if.hpp>
 #include <boost/integer_traits.hpp>
 
-#if !defined(BOOST_NO_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"
-#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
-#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
-#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
-#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
-#endif
-
-#ifndef BOOST_NO_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>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
-#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/bool.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
- BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
-#else
-//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
-#define BOOST_RATIO_CONCAT(A,B) A##B
-#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
-//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
-#endif
-
-
 //
 // We simply cannot include this header on gcc without getting copious warnings of the kind:
 //
@@ -273,7 +245,7 @@
>
>::type type;
   };
-
+
   template <class R, boost::intmax_t D>
   struct ratio_subtract<R, ratio<0,D> >
   {
@@ -322,7 +294,7 @@
              ((R2::num / gcd_n1_n2 ==1) && (R1::den / gcd_d1_d2)==1)
> type;
   };
-
+
   template <class T>
   struct is_ratio : public boost::false_type
   {};

Added: branches/release/boost/ratio/detail/ratio_io.hpp
==============================================================================
--- (empty file)
+++ branches/release/boost/ratio/detail/ratio_io.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -0,0 +1,1043 @@
+// ratio_io
+//
+// (C) Copyright Howard Hinnant
+// (C) Copyright 2010 Vicente J. Botet Escriba
+// Use, modification and distribution are subject to the Boost Software License,
+// 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
+// on chrono i/o under lvm/libc++ to Boost
+
+#ifndef BOOST_RATIO_DETAIL_RATIO_IO_HPP
+#define BOOST_RATIO_DETAIL_RATIO_IO_HPP
+
+/*
+
+ ratio_io synopsis
+
+#include <ratio>
+#include <string>
+
+namespace boost
+{
+
+template <class Ratio, class CharT>
+struct ratio_string
+{
+ static basic_string<CharT> short_name();
+ static basic_string<CharT> long_name();
+};
+
+} // boost
+
+*/
+
+#include <boost/config.hpp>
+#include <boost/ratio/ratio.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <string>
+#include <sstream>
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+#include <boost/ratio/ratio_static_string.hpp>
+#include <boost/static_string/static_string.hpp>
+#endif
+
+#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>
+//struct ratio_string_is_localizable : false_type {};
+//template <class Ratio>
+//struct ratio_string_id : integral_constant<int,0> {};
+
+template <class Ratio, class CharT>
+struct ratio_string
+{
+ static std::basic_string<CharT> short_name() {return long_name();}
+ static std::basic_string<CharT> long_name();
+ static std::basic_string<CharT> symbol() {return short_name();}
+ static std::basic_string<CharT> prefix() {return long_name();}
+};
+
+template <class Ratio, class CharT>
+std::basic_string<CharT>
+ratio_string<Ratio, CharT>::long_name()
+{
+ std::basic_ostringstream<CharT> os;
+ os << CharT('[') << Ratio::num << CharT('/')
+ << Ratio::den << CharT(']');
+ return os.str();
+}
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+namespace ratio_detail {
+template <class Ratio, class CharT>
+struct ratio_string_static
+{
+ static std::string short_name() {
+ return std::basic_string<CharT>(
+ static_string::c_str<
+ typename ratio_static_string<Ratio, CharT>::short_name
+ >::value);
+ }
+ static std::string long_name() {
+ return std::basic_string<CharT>(
+ static_string::c_str<
+ typename ratio_static_string<Ratio, CharT>::long_name
+ >::value);
+ }
+ static std::basic_string<CharT> symbol() {return short_name();}
+ static std::basic_string<CharT> prefix() {return long_name();}
+};
+}
+#endif
+// atto
+//template <>
+//struct ratio_string_is_localizable<atto> : true_type {};
+//
+//template <>
+//struct ratio_string_id<atto> : integral_constant<int,-18> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<atto, CharT> :
+ ratio_detail::ratio_string_static<atto,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<atto, char>
+{
+ static std::string short_name() {return std::string(1, 'a');}
+ static std::string long_name() {return std::string("atto");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<atto, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'a');}
+ static std::u16string long_name() {return std::u16string(u"atto");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<atto, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'a');}
+ static std::u32string long_name() {return std::u32string(U"atto");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<atto, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'a');}
+ static std::wstring long_name() {return std::wstring(L"atto");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// femto
+
+//template <>
+//struct ratio_string_is_localizable<femto> : true_type {};
+//
+//template <>
+//struct ratio_string_id<femto> : integral_constant<int,-15> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<femto, CharT> :
+ ratio_detail::ratio_string_static<femto,CharT>
+{};
+
+#else
+
+template <>
+struct ratio_string<femto, char>
+{
+ static std::string short_name() {return std::string(1, 'f');}
+ static std::string long_name() {return std::string("femto");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<femto, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'f');}
+ static std::u16string long_name() {return std::u16string(u"femto");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<femto, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'f');}
+ static std::u32string long_name() {return std::u32string(U"femto");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<femto, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'f');}
+ static std::wstring long_name() {return std::wstring(L"femto");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// pico
+
+//template <>
+//struct ratio_string_is_localizable<pico> : true_type {};
+//
+//template <>
+//struct ratio_string_id<pico> : integral_constant<int,-12> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<pico, CharT> :
+ ratio_detail::ratio_string_static<pico,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<pico, char>
+{
+ static std::string short_name() {return std::string(1, 'p');}
+ static std::string long_name() {return std::string("pico");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<pico, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'p');}
+ static std::u16string long_name() {return std::u16string(u"pico");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<pico, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'p');}
+ static std::u32string long_name() {return std::u32string(U"pico");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<pico, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'p');}
+ static std::wstring long_name() {return std::wstring(L"pico");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// nano
+
+//template <>
+//struct ratio_string_is_localizable<nano> : true_type {};
+//
+//template <>
+//struct ratio_string_id<nano> : integral_constant<int,-9> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<nano, CharT> :
+ ratio_detail::ratio_string_static<nano,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<nano, char>
+{
+ static std::string short_name() {return std::string(1, 'n');}
+ static std::string long_name() {return std::string("nano");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<nano, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'n');}
+ static std::u16string long_name() {return std::u16string(u"nano");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<nano, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'n');}
+ static std::u32string long_name() {return std::u32string(U"nano");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<nano, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'n');}
+ static std::wstring long_name() {return std::wstring(L"nano");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// micro
+
+//template <>
+//struct ratio_string_is_localizable<micro> : true_type {};
+//
+//template <>
+//struct ratio_string_id<micro> : integral_constant<int,-6> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<micro, CharT> :
+ ratio_detail::ratio_string_static<micro,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<micro, char>
+{
+ static std::string short_name() {return std::string("\xC2\xB5");}
+ static std::string long_name() {return std::string("micro");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<micro, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'\xB5');}
+ static std::u16string long_name() {return std::u16string(u"micro");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<micro, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'\xB5');}
+ static std::u32string long_name() {return std::u32string(U"micro");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<micro, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'\xB5');}
+ static std::wstring long_name() {return std::wstring(L"micro");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// milli
+
+//template <>
+//struct ratio_string_is_localizable<milli> : true_type {};
+//
+//template <>
+//struct ratio_string_id<milli> : integral_constant<int,-3> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<milli, CharT> :
+ ratio_detail::ratio_string_static<milli,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<milli, char>
+{
+ static std::string short_name() {return std::string(1, 'm');}
+ static std::string long_name() {return std::string("milli");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<milli, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'm');}
+ static std::u16string long_name() {return std::u16string(u"milli");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<milli, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'm');}
+ static std::u32string long_name() {return std::u32string(U"milli");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<milli, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'm');}
+ static std::wstring long_name() {return std::wstring(L"milli");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// centi
+
+//template <>
+//struct ratio_string_is_localizable<centi> : true_type {};
+//
+//template <>
+//struct ratio_string_id<centi> : integral_constant<int,-2> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<centi, CharT> :
+ ratio_detail::ratio_string_static<centi,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<centi, char>
+{
+ static std::string short_name() {return std::string(1, 'c');}
+ static std::string long_name() {return std::string("centi");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<centi, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'c');}
+ static std::u16string long_name() {return std::u16string(u"centi");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<centi, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'c');}
+ static std::u32string long_name() {return std::u32string(U"centi");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<centi, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'c');}
+ static std::wstring long_name() {return std::wstring(L"centi");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// deci
+
+//template <>
+//struct ratio_string_is_localizable<deci> : true_type {};
+//
+//template <>
+//struct ratio_string_id<deci> : integral_constant<int,-1> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<deci, CharT> :
+ ratio_detail::ratio_string_static<deci,CharT>
+{};
+
+#else
+
+template <>
+struct ratio_string<deci, char>
+{
+ static std::string short_name() {return std::string(1, 'd');}
+ static std::string long_name() {return std::string("deci");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<deci, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'd');}
+ static std::u16string long_name() {return std::u16string(u"deci");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<deci, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'd');}
+ static std::u32string long_name() {return std::u32string(U"deci");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<deci, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'd');}
+ static std::wstring long_name() {return std::wstring(L"deci");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// unit
+
+//template <>
+//struct ratio_string_is_localizable<ratio<1> > : true_type {};
+//
+//template <>
+//struct ratio_string_id<ratio<1> > : integral_constant<int,0> {};
+// deca
+
+//template <>
+//struct ratio_string_is_localizable<deca> : true_type {};
+//
+//template <>
+//struct ratio_string_id<deca> : integral_constant<int,1> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<deca, CharT> :
+ ratio_detail::ratio_string_static<deca,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<deca, char>
+{
+ static std::string short_name() {return std::string("da");}
+ static std::string long_name() {return std::string("deca");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<deca, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(u"da");}
+ static std::u16string long_name() {return std::u16string(u"deca");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<deca, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(U"da");}
+ static std::u32string long_name() {return std::u32string(U"deca");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<deca, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(L"da");}
+ static std::wstring long_name() {return std::wstring(L"deca");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// hecto
+
+//template <>
+//struct ratio_string_is_localizable<hecto> : true_type {};
+//
+//template <>
+//struct ratio_string_id<hecto> : integral_constant<int,2> {};
+
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<hecto, CharT> :
+ ratio_detail::ratio_string_static<hecto,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<hecto, char>
+{
+ static std::string short_name() {return std::string(1, 'h');}
+ static std::string long_name() {return std::string("hecto");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<hecto, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'h');}
+ static std::u16string long_name() {return std::u16string(u"hecto");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<hecto, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'h');}
+ static std::u32string long_name() {return std::u32string(U"hecto");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<hecto, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'h');}
+ static std::wstring long_name() {return std::wstring(L"hecto");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// kilo
+
+//template <>
+//struct ratio_string_is_localizable<kilo> : true_type {};
+//
+//template <>
+//struct ratio_string_id<kilo> : integral_constant<int,3> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<kilo, CharT> :
+ ratio_detail::ratio_string_static<kilo,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<kilo, char>
+{
+ static std::string short_name() {return std::string(1, 'k');}
+ static std::string long_name() {return std::string("kilo");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<kilo, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'k');}
+ static std::u16string long_name() {return std::u16string(u"kilo");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<kilo, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'k');}
+ static std::u32string long_name() {return std::u32string(U"kilo");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<kilo, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'k');}
+ static std::wstring long_name() {return std::wstring(L"kilo");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// mega
+
+//template <>
+//struct ratio_string_is_localizable<mega> : true_type {};
+//
+//template <>
+//struct ratio_string_id<mega> : integral_constant<int,6> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<mega, CharT> :
+ ratio_detail::ratio_string_static<mega,CharT>
+{};
+
+#else
+
+template <>
+struct ratio_string<mega, char>
+{
+ static std::string short_name() {return std::string(1, 'M');}
+ static std::string long_name() {return std::string("mega");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<mega, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'M');}
+ static std::u16string long_name() {return std::u16string(u"mega");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<mega, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'M');}
+ static std::u32string long_name() {return std::u32string(U"mega");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<mega, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'M');}
+ static std::wstring long_name() {return std::wstring(L"mega");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// giga
+
+//template <>
+//struct ratio_string_is_localizable<giga> : true_type {};
+//
+//template <>
+//struct ratio_string_id<giga> : integral_constant<int,9> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<giga, CharT> :
+ ratio_detail::ratio_string_static<giga,CharT>
+{};
+
+#else
+
+template <>
+struct ratio_string<giga, char>
+{
+ static std::string short_name() {return std::string(1, 'G');}
+ static std::string long_name() {return std::string("giga");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<giga, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'G');}
+ static std::u16string long_name() {return std::u16string(u"giga");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<giga, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'G');}
+ static std::u32string long_name() {return std::u32string(U"giga");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<giga, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'G');}
+ static std::wstring long_name() {return std::wstring(L"giga");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// tera
+
+//template <>
+//struct ratio_string_is_localizable<tera> : true_type {};
+//
+//template <>
+//struct ratio_string_id<tera> : integral_constant<int,12> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<tera, CharT> :
+ ratio_detail::ratio_string_static<tera,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<tera, char>
+{
+ static std::string short_name() {return std::string(1, 'T');}
+ static std::string long_name() {return std::string("tera");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<tera, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'T');}
+ static std::u16string long_name() {return std::u16string(u"tera");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<tera, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'T');}
+ static std::u32string long_name() {return std::u32string(U"tera");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<tera, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'T');}
+ static std::wstring long_name() {return std::wstring(L"tera");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// peta
+
+//template <>
+//struct ratio_string_is_localizable<peta> : true_type {};
+//
+//template <>
+//struct ratio_string_id<peta> : integral_constant<int,15> {};
+
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<peta, CharT> :
+ ratio_detail::ratio_string_static<peta,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<peta, char>
+{
+ static std::string short_name() {return std::string(1, 'P');}
+ static std::string long_name() {return std::string("peta");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<peta, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'P');}
+ static std::u16string long_name() {return std::u16string(u"peta");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<peta, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'P');}
+ static std::u32string long_name() {return std::u32string(U"peta");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<peta, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'P');}
+ static std::wstring long_name() {return std::wstring(L"peta");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+// exa
+
+//template <>
+//struct ratio_string_is_localizable<exa> : true_type {};
+//
+//template <>
+//struct ratio_string_id<exa> : integral_constant<int,18> {};
+
+#ifdef BOOST_RATIO_HAS_STATIC_STRING
+template <typename CharT>
+struct ratio_string<exa, CharT> :
+ ratio_detail::ratio_string_static<exa,CharT>
+{};
+
+#else
+template <>
+struct ratio_string<exa, char>
+{
+ static std::string short_name() {return std::string(1, 'E');}
+ static std::string long_name() {return std::string("exa");}
+ static std::string symbol() {return short_name();}
+ static std::string prefix() {return long_name();}
+};
+
+#if BOOST_RATIO_HAS_UNICODE_SUPPORT
+
+template <>
+struct ratio_string<exa, char16_t>
+{
+ static std::u16string short_name() {return std::u16string(1, u'E');}
+ static std::u16string long_name() {return std::u16string(u"exa");}
+ static std::u16string symbol() {return short_name();}
+ static std::u16string prefix() {return long_name();}
+};
+
+template <>
+struct ratio_string<exa, char32_t>
+{
+ static std::u32string short_name() {return std::u32string(1, U'E');}
+ static std::u32string long_name() {return std::u32string(U"exa");}
+ static std::u32string symbol() {return short_name();}
+ static std::u32string prefix() {return long_name();}
+};
+
+#endif
+
+#ifndef BOOST_NO_STD_WSTRING
+template <>
+struct ratio_string<exa, wchar_t>
+{
+ static std::wstring short_name() {return std::wstring(1, L'E');}
+ static std::wstring long_name() {return std::wstring(L"exa");}
+ static std::wstring symbol() {return short_name();}
+ static std::wstring prefix() {return long_name();}
+};
+#endif
+#endif
+
+}
+
+#endif // BOOST_RATIO_RATIO_IO_HPP

Modified: branches/release/boost/ratio/ratio.hpp
==============================================================================
--- branches/release/boost/ratio/ratio.hpp (original)
+++ branches/release/boost/ratio/ratio.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -32,7 +32,7 @@
 #ifndef BOOST_RATIO_RATIO_HPP
 #define BOOST_RATIO_RATIO_HPP
 
-#include <boost/config.hpp>
+#include <boost/ratio/config.hpp>
 #include <boost/ratio/detail/mpl/abs.hpp>
 #include <boost/ratio/detail/mpl/sign.hpp>
 #include <boost/ratio/detail/mpl/gcd.hpp>
@@ -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: branches/release/boost/ratio/ratio_fwd.hpp
==============================================================================
--- branches/release/boost/ratio/ratio_fwd.hpp (original)
+++ branches/release/boost/ratio/ratio_fwd.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -32,12 +32,7 @@
 #ifndef BOOST_RATIO_RATIO_FWD_HPP
 #define BOOST_RATIO_RATIO_FWD_HPP
 
-#include <boost/cstdint.hpp>
-#ifdef INTMAX_C
-#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a)
-#else
-#define BOOST_RATIO_INTMAX_C(a) a##LL
-#endif
+#include <boost/ratio/config.hpp>
 
 namespace boost
 {
@@ -82,7 +77,7 @@
 typedef ratio< BOOST_RATIO_INTMAX_C(1000000000000), BOOST_RATIO_INTMAX_C(1)> tera;
 typedef ratio< BOOST_RATIO_INTMAX_C(1000000000000000), BOOST_RATIO_INTMAX_C(1)> peta;
 typedef ratio<BOOST_RATIO_INTMAX_C(1000000000000000000), BOOST_RATIO_INTMAX_C(1)> exa;
-
+
 } // namespace boost
 
 

Modified: branches/release/boost/ratio/ratio_io.hpp
==============================================================================
--- branches/release/boost/ratio/ratio_io.hpp (original)
+++ branches/release/boost/ratio/ratio_io.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 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
@@ -25,13 +25,18 @@
 template <class Ratio, class CharT>
 struct ratio_string
 {
- static basic_string<CharT> short_name();
- static basic_string<CharT> long_name();
+ static basic_string<CharT> prefix();
+ static basic_string<CharT> symbol();
 };
 
 } // boost
 
 */
+#include <boost/ratio/config.hpp>
+
+#ifdef BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#include <boost/ratio/detail/ratio_io.hpp>
+#else
 
 #include <boost/config.hpp>
 #include <boost/ratio/ratio.hpp>
@@ -44,31 +49,29 @@
 #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
 
 namespace boost {
 
-template <class Ratio>
-struct ratio_string_is_localizable : false_type {};
-template <class Ratio>
-struct ratio_string_id : integral_constant<int,0> {};
+//template <class Ratio>
+//struct ratio_string_is_localizable : false_type {};
+//template <class Ratio>
+//struct ratio_string_id : integral_constant<int,0> {};
 
 template <class Ratio, class CharT>
 struct ratio_string
 {
- static std::basic_string<CharT> short_name() {return long_name();}
- static std::basic_string<CharT> long_name();
- static std::basic_string<CharT> symbol() {return short_name();}
- static std::basic_string<CharT> prefix() {return long_name();}
+ static std::basic_string<CharT> symbol() {return prefix();}
+ static std::basic_string<CharT> prefix();
 };
 
 template <class Ratio, class CharT>
 std::basic_string<CharT>
-ratio_string<Ratio, CharT>::long_name()
+ratio_string<Ratio, CharT>::prefix()
 {
     std::basic_ostringstream<CharT> os;
     os << CharT('[') << Ratio::num << CharT('/')
@@ -81,44 +84,40 @@
 template <class Ratio, class CharT>
 struct ratio_string_static
 {
- static std::string short_name() {
+ static std::string symbol() {
         return std::basic_string<CharT>(
                 static_string::c_str<
- typename ratio_static_string<Ratio, CharT>::short_name
+ typename ratio_static_string<Ratio, CharT>::symbol
>::value);
     }
- static std::string long_name() {
+ static std::string prefix() {
         return std::basic_string<CharT>(
                 static_string::c_str<
- typename ratio_static_string<Ratio, CharT>::long_name
+ typename ratio_static_string<Ratio, CharT>::prefix
>::value);
     }
- static std::basic_string<CharT> symbol() {return short_name();}
- static std::basic_string<CharT> prefix() {return long_name();}
 };
 }
 #endif
 // atto
-template <>
-struct ratio_string_is_localizable<atto> : true_type {};
-
-template <>
-struct ratio_string_id<atto> : integral_constant<int,-18> {};
+//template <>
+//struct ratio_string_is_localizable<atto> : true_type {};
+//
+//template <>
+//struct ratio_string_id<atto> : integral_constant<int,-18> {};
 
 #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
 template <>
 struct ratio_string<atto, char>
 {
- static std::string short_name() {return std::string(1, 'a');}
- static std::string long_name() {return std::string("atto");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'a');}
+ static std::string prefix() {return std::string("atto");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -126,19 +125,15 @@
 template <>
 struct ratio_string<atto, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'a');}
- static std::u16string long_name() {return std::u16string(u"atto");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'a');}
+ static std::u16string prefix() {return std::u16string(u"atto");}
 };
 
 template <>
 struct ratio_string<atto, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'a');}
- static std::u32string long_name() {return std::u32string(U"atto");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'a');}
+ static std::u32string prefix() {return std::u32string(U"atto");}
 };
 
 #endif
@@ -147,26 +142,18 @@
 template <>
 struct ratio_string<atto, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'a');}
- static std::wstring long_name() {return std::wstring(L"atto");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'a');}
+ static std::wstring prefix() {return std::wstring(L"atto");}
 };
 #endif
 #endif
 
 // femto
 
-template <>
-struct ratio_string_is_localizable<femto> : true_type {};
-
-template <>
-struct ratio_string_id<femto> : integral_constant<int,-15> {};
-
 #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
@@ -174,10 +161,8 @@
 template <>
 struct ratio_string<femto, char>
 {
- static std::string short_name() {return std::string(1, 'f');}
- static std::string long_name() {return std::string("femto");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'f');}
+ static std::string prefix() {return std::string("femto");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -185,19 +170,15 @@
 template <>
 struct ratio_string<femto, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'f');}
- static std::u16string long_name() {return std::u16string(u"femto");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'f');}
+ static std::u16string prefix() {return std::u16string(u"femto");}
 };
 
 template <>
 struct ratio_string<femto, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'f');}
- static std::u32string long_name() {return std::u32string(U"femto");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'f');}
+ static std::u32string prefix() {return std::u32string(U"femto");}
 };
 
 #endif
@@ -206,36 +187,26 @@
 template <>
 struct ratio_string<femto, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'f');}
- static std::wstring long_name() {return std::wstring(L"femto");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'f');}
+ static std::wstring prefix() {return std::wstring(L"femto");}
 };
 #endif
 #endif
 
 // pico
 
-template <>
-struct ratio_string_is_localizable<pico> : true_type {};
-
-template <>
-struct ratio_string_id<pico> : integral_constant<int,-12> {};
-
 #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
 template <>
 struct ratio_string<pico, char>
 {
- static std::string short_name() {return std::string(1, 'p');}
- static std::string long_name() {return std::string("pico");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'p');}
+ static std::string prefix() {return std::string("pico");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -243,19 +214,15 @@
 template <>
 struct ratio_string<pico, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'p');}
- static std::u16string long_name() {return std::u16string(u"pico");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'p');}
+ static std::u16string prefix() {return std::u16string(u"pico");}
 };
 
 template <>
 struct ratio_string<pico, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'p');}
- static std::u32string long_name() {return std::u32string(U"pico");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'p');}
+ static std::u32string prefix() {return std::u32string(U"pico");}
 };
 
 #endif
@@ -264,36 +231,26 @@
 template <>
 struct ratio_string<pico, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'p');}
- static std::wstring long_name() {return std::wstring(L"pico");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'p');}
+ static std::wstring prefix() {return std::wstring(L"pico");}
 };
 #endif
 #endif
 
 // nano
 
-template <>
-struct ratio_string_is_localizable<nano> : true_type {};
-
-template <>
-struct ratio_string_id<nano> : integral_constant<int,-9> {};
-
 #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
 template <>
 struct ratio_string<nano, char>
 {
- static std::string short_name() {return std::string(1, 'n');}
- static std::string long_name() {return std::string("nano");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'n');}
+ static std::string prefix() {return std::string("nano");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -301,19 +258,15 @@
 template <>
 struct ratio_string<nano, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'n');}
- static std::u16string long_name() {return std::u16string(u"nano");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'n');}
+ static std::u16string prefix() {return std::u16string(u"nano");}
 };
 
 template <>
 struct ratio_string<nano, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'n');}
- static std::u32string long_name() {return std::u32string(U"nano");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'n');}
+ static std::u32string prefix() {return std::u32string(U"nano");}
 };
 
 #endif
@@ -322,36 +275,26 @@
 template <>
 struct ratio_string<nano, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'n');}
- static std::wstring long_name() {return std::wstring(L"nano");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'n');}
+ static std::wstring prefix() {return std::wstring(L"nano");}
 };
 #endif
 #endif
 
 // micro
 
-template <>
-struct ratio_string_is_localizable<micro> : true_type {};
-
-template <>
-struct ratio_string_id<micro> : integral_constant<int,-6> {};
-
 #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
 template <>
 struct ratio_string<micro, char>
 {
- static std::string short_name() {return std::string("\xC2\xB5");}
- static std::string long_name() {return std::string("micro");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string("\xC2\xB5");}
+ static std::string prefix() {return std::string("micro");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -359,19 +302,15 @@
 template <>
 struct ratio_string<micro, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'\xB5');}
- static std::u16string long_name() {return std::u16string(u"micro");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'\xB5');}
+ static std::u16string prefix() {return std::u16string(u"micro");}
 };
 
 template <>
 struct ratio_string<micro, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'\xB5');}
- static std::u32string long_name() {return std::u32string(U"micro");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'\xB5');}
+ static std::u32string prefix() {return std::u32string(U"micro");}
 };
 
 #endif
@@ -380,36 +319,26 @@
 template <>
 struct ratio_string<micro, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'\xB5');}
- static std::wstring long_name() {return std::wstring(L"micro");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'\xB5');}
+ static std::wstring prefix() {return std::wstring(L"micro");}
 };
 #endif
 #endif
 
 // milli
 
-template <>
-struct ratio_string_is_localizable<milli> : true_type {};
-
-template <>
-struct ratio_string_id<milli> : integral_constant<int,-3> {};
-
 #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
 template <>
 struct ratio_string<milli, char>
 {
- static std::string short_name() {return std::string(1, 'm');}
- static std::string long_name() {return std::string("milli");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'm');}
+ static std::string prefix() {return std::string("milli");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -417,19 +346,15 @@
 template <>
 struct ratio_string<milli, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'm');}
- static std::u16string long_name() {return std::u16string(u"milli");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'm');}
+ static std::u16string prefix() {return std::u16string(u"milli");}
 };
 
 template <>
 struct ratio_string<milli, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'm');}
- static std::u32string long_name() {return std::u32string(U"milli");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'm');}
+ static std::u32string prefix() {return std::u32string(U"milli");}
 };
 
 #endif
@@ -438,36 +363,26 @@
 template <>
 struct ratio_string<milli, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'm');}
- static std::wstring long_name() {return std::wstring(L"milli");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'm');}
+ static std::wstring prefix() {return std::wstring(L"milli");}
 };
 #endif
 #endif
 
 // centi
 
-template <>
-struct ratio_string_is_localizable<centi> : true_type {};
-
-template <>
-struct ratio_string_id<centi> : integral_constant<int,-2> {};
-
 #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
 template <>
 struct ratio_string<centi, char>
 {
- static std::string short_name() {return std::string(1, 'c');}
- static std::string long_name() {return std::string("centi");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'c');}
+ static std::string prefix() {return std::string("centi");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -475,19 +390,15 @@
 template <>
 struct ratio_string<centi, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'c');}
- static std::u16string long_name() {return std::u16string(u"centi");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'c');}
+ static std::u16string prefix() {return std::u16string(u"centi");}
 };
 
 template <>
 struct ratio_string<centi, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'c');}
- static std::u32string long_name() {return std::u32string(U"centi");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'c');}
+ static std::u32string prefix() {return std::u32string(U"centi");}
 };
 
 #endif
@@ -496,26 +407,18 @@
 template <>
 struct ratio_string<centi, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'c');}
- static std::wstring long_name() {return std::wstring(L"centi");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'c');}
+ static std::wstring prefix() {return std::wstring(L"centi");}
 };
 #endif
 #endif
 
 // deci
 
-template <>
-struct ratio_string_is_localizable<deci> : true_type {};
-
-template <>
-struct ratio_string_id<deci> : integral_constant<int,-1> {};
-
 #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
@@ -523,10 +426,8 @@
 template <>
 struct ratio_string<deci, char>
 {
- static std::string short_name() {return std::string(1, 'd');}
- static std::string long_name() {return std::string("deci");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'd');}
+ static std::string prefix() {return std::string("deci");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -534,19 +435,15 @@
 template <>
 struct ratio_string<deci, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'd');}
- static std::u16string long_name() {return std::u16string(u"deci");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'd');}
+ static std::u16string prefix() {return std::u16string(u"deci");}
 };
 
 template <>
 struct ratio_string<deci, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'd');}
- static std::u32string long_name() {return std::u32string(U"deci");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'd');}
+ static std::u32string prefix() {return std::u32string(U"deci");}
 };
 
 #endif
@@ -555,43 +452,29 @@
 template <>
 struct ratio_string<deci, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'd');}
- static std::wstring long_name() {return std::wstring(L"deci");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'd');}
+ static std::wstring prefix() {return std::wstring(L"deci");}
 };
 #endif
 #endif
 
 // unit
 
-template <>
-struct ratio_string_is_localizable<ratio<1> > : true_type {};
-
-template <>
-struct ratio_string_id<ratio<1> > : integral_constant<int,0> {};
 // deca
 
-template <>
-struct ratio_string_is_localizable<deca> : true_type {};
-
-template <>
-struct ratio_string_id<deca> : integral_constant<int,1> {};
 
 #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
 template <>
 struct ratio_string<deca, char>
 {
- static std::string short_name() {return std::string("da");}
- static std::string long_name() {return std::string("deca");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string("da");}
+ static std::string prefix() {return std::string("deca");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -599,19 +482,15 @@
 template <>
 struct ratio_string<deca, char16_t>
 {
- static std::u16string short_name() {return std::u16string(u"da");}
- static std::u16string long_name() {return std::u16string(u"deca");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(u"da");}
+ static std::u16string prefix() {return std::u16string(u"deca");}
 };
 
 template <>
 struct ratio_string<deca, char32_t>
 {
- static std::u32string short_name() {return std::u32string(U"da");}
- static std::u32string long_name() {return std::u32string(U"deca");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(U"da");}
+ static std::u32string prefix() {return std::u32string(U"deca");}
 };
 
 #endif
@@ -620,37 +499,26 @@
 template <>
 struct ratio_string<deca, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(L"da");}
- static std::wstring long_name() {return std::wstring(L"deca");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(L"da");}
+ static std::wstring prefix() {return std::wstring(L"deca");}
 };
 #endif
 #endif
 
 // hecto
 
-template <>
-struct ratio_string_is_localizable<hecto> : true_type {};
-
-template <>
-struct ratio_string_id<hecto> : integral_constant<int,2> {};
-
-
 #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
 template <>
 struct ratio_string<hecto, char>
 {
- static std::string short_name() {return std::string(1, 'h');}
- static std::string long_name() {return std::string("hecto");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'h');}
+ static std::string prefix() {return std::string("hecto");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -658,19 +526,15 @@
 template <>
 struct ratio_string<hecto, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'h');}
- static std::u16string long_name() {return std::u16string(u"hecto");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'h');}
+ static std::u16string prefix() {return std::u16string(u"hecto");}
 };
 
 template <>
 struct ratio_string<hecto, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'h');}
- static std::u32string long_name() {return std::u32string(U"hecto");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'h');}
+ static std::u32string prefix() {return std::u32string(U"hecto");}
 };
 
 #endif
@@ -679,36 +543,26 @@
 template <>
 struct ratio_string<hecto, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'h');}
- static std::wstring long_name() {return std::wstring(L"hecto");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'h');}
+ static std::wstring prefix() {return std::wstring(L"hecto");}
 };
 #endif
 #endif
 
 // kilo
 
-template <>
-struct ratio_string_is_localizable<kilo> : true_type {};
-
-template <>
-struct ratio_string_id<kilo> : integral_constant<int,3> {};
-
 #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
 template <>
 struct ratio_string<kilo, char>
 {
- static std::string short_name() {return std::string(1, 'k');}
- static std::string long_name() {return std::string("kilo");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'k');}
+ static std::string prefix() {return std::string("kilo");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -716,19 +570,15 @@
 template <>
 struct ratio_string<kilo, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'k');}
- static std::u16string long_name() {return std::u16string(u"kilo");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'k');}
+ static std::u16string prefix() {return std::u16string(u"kilo");}
 };
 
 template <>
 struct ratio_string<kilo, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'k');}
- static std::u32string long_name() {return std::u32string(U"kilo");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'k');}
+ static std::u32string prefix() {return std::u32string(U"kilo");}
 };
 
 #endif
@@ -737,26 +587,18 @@
 template <>
 struct ratio_string<kilo, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'k');}
- static std::wstring long_name() {return std::wstring(L"kilo");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'k');}
+ static std::wstring prefix() {return std::wstring(L"kilo");}
 };
 #endif
 #endif
 
 // mega
 
-template <>
-struct ratio_string_is_localizable<mega> : true_type {};
-
-template <>
-struct ratio_string_id<mega> : integral_constant<int,6> {};
-
 #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
@@ -764,10 +606,8 @@
 template <>
 struct ratio_string<mega, char>
 {
- static std::string short_name() {return std::string(1, 'M');}
- static std::string long_name() {return std::string("mega");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'M');}
+ static std::string prefix() {return std::string("mega");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -775,19 +615,15 @@
 template <>
 struct ratio_string<mega, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'M');}
- static std::u16string long_name() {return std::u16string(u"mega");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'M');}
+ static std::u16string prefix() {return std::u16string(u"mega");}
 };
 
 template <>
 struct ratio_string<mega, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'M');}
- static std::u32string long_name() {return std::u32string(U"mega");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'M');}
+ static std::u32string prefix() {return std::u32string(U"mega");}
 };
 
 #endif
@@ -796,26 +632,18 @@
 template <>
 struct ratio_string<mega, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'M');}
- static std::wstring long_name() {return std::wstring(L"mega");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'M');}
+ static std::wstring prefix() {return std::wstring(L"mega");}
 };
 #endif
 #endif
 
 // giga
 
-template <>
-struct ratio_string_is_localizable<giga> : true_type {};
-
-template <>
-struct ratio_string_id<giga> : integral_constant<int,9> {};
-
 #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
@@ -823,10 +651,8 @@
 template <>
 struct ratio_string<giga, char>
 {
- static std::string short_name() {return std::string(1, 'G');}
- static std::string long_name() {return std::string("giga");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'G');}
+ static std::string prefix() {return std::string("giga");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -834,19 +660,15 @@
 template <>
 struct ratio_string<giga, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'G');}
- static std::u16string long_name() {return std::u16string(u"giga");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'G');}
+ static std::u16string prefix() {return std::u16string(u"giga");}
 };
 
 template <>
 struct ratio_string<giga, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'G');}
- static std::u32string long_name() {return std::u32string(U"giga");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'G');}
+ static std::u32string prefix() {return std::u32string(U"giga");}
 };
 
 #endif
@@ -855,36 +677,27 @@
 template <>
 struct ratio_string<giga, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'G');}
- static std::wstring long_name() {return std::wstring(L"giga");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'G');}
+ static std::wstring prefix() {return std::wstring(L"giga");}
 };
 #endif
 #endif
 
 // tera
 
-template <>
-struct ratio_string_is_localizable<tera> : true_type {};
-
-template <>
-struct ratio_string_id<tera> : integral_constant<int,12> {};
-
+//template <>
 #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
 template <>
 struct ratio_string<tera, char>
 {
- static std::string short_name() {return std::string(1, 'T');}
- static std::string long_name() {return std::string("tera");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'T');}
+ static std::string prefix() {return std::string("tera");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -892,19 +705,15 @@
 template <>
 struct ratio_string<tera, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'T');}
- static std::u16string long_name() {return std::u16string(u"tera");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'T');}
+ static std::u16string prefix() {return std::u16string(u"tera");}
 };
 
 template <>
 struct ratio_string<tera, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'T');}
- static std::u32string long_name() {return std::u32string(U"tera");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'T');}
+ static std::u32string prefix() {return std::u32string(U"tera");}
 };
 
 #endif
@@ -913,37 +722,26 @@
 template <>
 struct ratio_string<tera, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'T');}
- static std::wstring long_name() {return std::wstring(L"tera");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'T');}
+ static std::wstring prefix() {return std::wstring(L"tera");}
 };
 #endif
 #endif
 
 // peta
 
-template <>
-struct ratio_string_is_localizable<peta> : true_type {};
-
-template <>
-struct ratio_string_id<peta> : integral_constant<int,15> {};
-
-
 #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
 template <>
 struct ratio_string<peta, char>
 {
- static std::string short_name() {return std::string(1, 'P');}
- static std::string long_name() {return std::string("peta");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'P');}
+ static std::string prefix() {return std::string("peta");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -951,19 +749,15 @@
 template <>
 struct ratio_string<peta, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'P');}
- static std::u16string long_name() {return std::u16string(u"peta");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'P');}
+ static std::u16string prefix() {return std::u16string(u"peta");}
 };
 
 template <>
 struct ratio_string<peta, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'P');}
- static std::u32string long_name() {return std::u32string(U"peta");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'P');}
+ static std::u32string prefix() {return std::u32string(U"peta");}
 };
 
 #endif
@@ -972,36 +766,26 @@
 template <>
 struct ratio_string<peta, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'P');}
- static std::wstring long_name() {return std::wstring(L"peta");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'P');}
+ static std::wstring prefix() {return std::wstring(L"peta");}
 };
 #endif
 #endif
 
 // exa
 
-template <>
-struct ratio_string_is_localizable<exa> : true_type {};
-
-template <>
-struct ratio_string_id<exa> : integral_constant<int,18> {};
-
 #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
 template <>
 struct ratio_string<exa, char>
 {
- static std::string short_name() {return std::string(1, 'E');}
- static std::string long_name() {return std::string("exa");}
- static std::string symbol() {return short_name();}
- static std::string prefix() {return long_name();}
+ static std::string symbol() {return std::string(1, 'E');}
+ static std::string prefix() {return std::string("exa");}
 };
 
 #if BOOST_RATIO_HAS_UNICODE_SUPPORT
@@ -1009,19 +793,15 @@
 template <>
 struct ratio_string<exa, char16_t>
 {
- static std::u16string short_name() {return std::u16string(1, u'E');}
- static std::u16string long_name() {return std::u16string(u"exa");}
- static std::u16string symbol() {return short_name();}
- static std::u16string prefix() {return long_name();}
+ static std::u16string symbol() {return std::u16string(1, u'E');}
+ static std::u16string prefix() {return std::u16string(u"exa");}
 };
 
 template <>
 struct ratio_string<exa, char32_t>
 {
- static std::u32string short_name() {return std::u32string(1, U'E');}
- static std::u32string long_name() {return std::u32string(U"exa");}
- static std::u32string symbol() {return short_name();}
- static std::u32string prefix() {return long_name();}
+ static std::u32string symbol() {return std::u32string(1, U'E');}
+ static std::u32string prefix() {return std::u32string(U"exa");}
 };
 
 #endif
@@ -1030,14 +810,13 @@
 template <>
 struct ratio_string<exa, wchar_t>
 {
- static std::wstring short_name() {return std::wstring(1, L'E');}
- static std::wstring long_name() {return std::wstring(L"exa");}
- static std::wstring symbol() {return short_name();}
- static std::wstring prefix() {return long_name();}
+ static std::wstring symbol() {return std::wstring(1, L'E');}
+ static std::wstring prefix() {return std::wstring(L"exa");}
 };
 #endif
 #endif
 
 }
 
+#endif // BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
 #endif // BOOST_RATIO_RATIO_IO_HPP

Modified: branches/release/boost/ratio/ratio_static_string.hpp
==============================================================================
--- branches/release/boost/ratio/ratio_static_string.hpp (original)
+++ branches/release/boost/ratio/ratio_static_string.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 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;
 

Modified: branches/release/libs/ratio/doc/ratio.qbk
==============================================================================
--- branches/release/libs/ratio/doc/ratio.qbk (original)
+++ branches/release/libs/ratio/doc/ratio.qbk 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -9,13 +9,13 @@
 
 [library Boost.Ratio
     [quickbook 1.5]
- [version 1.0.1]
+ [version 2.0.0]
     [authors [Hinnant, Howard]]
     [authors [Dawes, Beman]]
     [authors [Botet Escriba, Vicente J.]]
     [copyright 2008 Howard Hinnant]
     [copyright 2006, 2008 Beman Dawes]
- [copyright 2009-2011 Vicente J. Botet Escriba]
+ [copyright 2009-2012 Vicente J. Botet Escriba]
     [category math]
     [id ratio]
     [dirname ratio]
@@ -42,12 +42,14 @@
 
 [template ratio_conf[link_text] [link ratio.reference.std.ratio_hpp.conf [link_text]]]
 
-[def __BOOST_RATIO_USES_STATIC_ASSERT [link ratio.reference.std.ratio_hpp.conf `BOOST_RATIO_USES_STATIC_ASSERT`]]
-[def __BOOST_RATIO_USES_MPL_ASSERT [link ratio.reference.std.ratio_hpp.conf `BOOST_RATIO_USES_MPL_ASSERT`]]
-[def __BOOST_RATIO_USES_ARRAY_ASSERT [link ratio.reference.std.ratio_hpp.conf `BOOST_RATIO_USES_ARRAY_ASSERT`]]
-
-[def __BOOST_RATIO_EXTENSIONS [link ratio.reference.std.ratio_hpp.extensions `BOOST_RATIO_EXTENSIONS`]]
-
+[def __BOOST_RATIO_USES_STATIC_ASSERT [link ratio.reference.config_hpp.assert `BOOST_RATIO_USES_STATIC_ASSERT`]]
+[def __BOOST_RATIO_USES_MPL_ASSERT [link ratio.reference.config_hpp.assert `BOOST_RATIO_USES_MPL_ASSERT`]]
+[def __BOOST_RATIO_USES_ARRAY_ASSERT [link ratio.reference.config_hpp.assert `BOOST_RATIO_USES_ARRAY_ASSERT`]]
+
+[def __BOOST_RATIO_EXTENSIONS [link ratio.reference.config_hpp.ext `BOOST_RATIO_EXTENSIONS`]]
+[def __BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 [link ratio.reference.config_hpp.deprecated `BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0`]]
+[def __BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 [link ratio.reference.config_hpp.deprecated `BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 `]]
+[def __BOOST_RATIO_VERSION [link ratio.reference.config_hpp.version `BOOST_RATIO_VERSION `]]
 
 
 [template ratio_arithmetic[link_text] [link ratio.reference.std.ratio_hpp.ratio_arithmetic [link_text]]]
@@ -313,7 +315,7 @@
 
 [heading Ratio I/O]
 
-For each `ratio<N, D>` there exists a `ratio_string<ratio<N, D>, CharT>` for which you can query two strings: `short_name` and `long_name`. For those `ratio`'s that correspond to an [@http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes SI prefix] long_name corresponds to the internationally recognized prefix, stored as a `basic_string<CharT>`. For example `ratio_string<mega, char>::long_name()` returns `string("mega")`. For those `ratio`s that correspond to an [@http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes SI prefix] `short_name` corresponds to the internationally recognized symbol, stored as a `basic_string<CharT>`. For example, `ratio_string<mega, char>::short_name()` returns `string("M")`. For all other `ratio`s, both `long_name()` and `short_name()` return a `basic_string` containing "[`ratio::num/ratio::den`]".
+For each `ratio<N, D>` there exists a `ratio_string<ratio<N, D>, CharT>` for which you can query two strings: `symbol` and `prefix`. For those `ratio`'s that correspond to an [@http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes SI prefix] prefix corresponds to the internationally recognized prefix, stored as a `basic_string<CharT>`. For example `ratio_string<mega, char>::prefix()` returns `string("mega")`. For those `ratio`s that correspond to an [@http://en.wikipedia.org/wiki/SI_prefix#List_of_SI_prefixes SI prefix] `symbol` corresponds to the internationally recognized symbol, stored as a `basic_string<CharT>`. For example, `ratio_string<mega, char>::symbol()` returns `string("M")`. For all other `ratio`s, both `prefix()` and `symbol()` return a `basic_string` containing "[`ratio::num/ratio::den`]".
 
 `ratio_string<ratio<N, D>, CharT>` is only defined for four character types:
 
@@ -324,7 +326,7 @@
 
 When the character is char, UTF-8 will be used to encode the names. When the character is `char16_t`, UTF-16 will be used to encode the names. When the character is `char32_t`, UTF-32 will be used to encode the names. When the character is `wchar_t`, the encoding will be UTF-16 if `wchar_t` is 16 bits, and otherwise UTF-32.
 
-The `short_name` (Greek mu or [mu]) for micro is defined by [@http://www.unicode.org/charts/PDF/U0080.pdf Unicode] to be U+00B5.
+The `symbol` (Greek mu or [mu]) for micro is defined by [@http://www.unicode.org/charts/PDF/U0080.pdf Unicode] to be U+00B5.
 
 [*Examples:]
 
@@ -336,30 +338,30 @@
         using namespace std;
         using namespace boost;
 
- cout << "ratio_string<deca, char>::long_name() = "
- << ratio_string<deca, char>::long_name() << '\n';
- cout << "ratio_string<deca, char>::short_name() = "
- << ratio_string<deca, char>::short_name() << '\n';
-
- cout << "ratio_string<giga, char>::long_name() = "
- << ratio_string<giga, char>::long_name() << '\n';
- cout << "ratio_string<giga, char>::short_name() = "
- << ratio_string<giga, char>::short_name() << '\n';
-
- cout << "ratio_string<ratio<4, 6>, char>::long_name() = "
- << ratio_string<ratio<4, 6>, char>::long_name() << '\n';
- cout << "ratio_string<ratio<4, 6>, char>::short_name() = "
- << ratio_string<ratio<4, 6>, char>::short_name() << '\n';
+ cout << "ratio_string<deca, char>::prefix() = "
+ << ratio_string<deca, char>::prefix() << '\n';
+ cout << "ratio_string<deca, char>::symbol() = "
+ << ratio_string<deca, char>::symbol() << '\n';
+
+ cout << "ratio_string<giga, char>::prefix() = "
+ << ratio_string<giga, char>::prefix() << '\n';
+ cout << "ratio_string<giga, char>::symbol() = "
+ << ratio_string<giga, char>::symbol() << '\n';
+
+ cout << "ratio_string<ratio<4, 6>, char>::prefix() = "
+ << ratio_string<ratio<4, 6>, char>::prefix() << '\n';
+ cout << "ratio_string<ratio<4, 6>, char>::symbol() = "
+ << ratio_string<ratio<4, 6>, char>::symbol() << '\n';
     }
 
 The output will be
 
- ratio_string<deca, char>::long_name() = deca
- ratio_string<deca, char>::short_name() = da
- ratio_string<giga, char>::long_name() = giga
- ratio_string<giga, char>::short_name() = G
- ratio_string<ratio<4, 6>, char>::long_name() = [2/3]
- ratio_string<ratio<4, 6>, char>::short_name() = [2/3]
+ ratio_string<deca, char>::prefix() = deca
+ ratio_string<deca, char>::symbol() = da
+ ratio_string<giga, char>::prefix() = giga
+ ratio_string<giga, char>::symbol() = G
+ ratio_string<ratio<4, 6>, char>::prefix() = [2/3]
+ ratio_string<ratio<4, 6>, char>::symbol() = [2/3]
 
 
 [heading Ratio MPL Numeric Metafunctions]
@@ -642,6 +644,68 @@
 [/=================]
 
 [/=================================================]
+[section:config_hpp Header `<boost/ratio/config.hpp>`]
+[/=================================================]
+
+
+ // Configuration macros
+ #define __BOOST_RATIO_VERSION
+ #define __BOOST_RATIO_EXTENSIONS
+ #define __BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+ #define __BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+ #define __BOOST_RATIO_USES_STATIC_ASSERT
+ #define __BOOST_RATIO_USES_MPL_ASSERT
+ #define __BOOST_RATIO_USES_ARRAY_ASSERT
+
+
+[section:ext Extensions]
+
+When __BOOST_RATIO_EXTENSIONS is defined, __Boost_Ratio provides in addition some extension to the C++ standard, see below.
+
+[endsect]
+[section:deprecated Deprecated]
+
+When __BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 is defined the deprecated features stated as DEPRECATED V2 are provided.
+
+When __BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 is defined the deprecated features stated as DEPRECATED V2 are NOT provided.
+
+[endsect]
+[section:version Version]
+
+__BOOST_RATIO_VERSION stands for the Boost.Ratio version which can be 1 or 2. The default up to 1.55 is version 1. Since 1.56 it will be 2.
+
+When __BOOST_RATIO_VERSION is 1 __BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 is defined by default.
+
+When __BOOST_RATIO_VERSION is 2 __BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 is defined by default.
+
+[endsect]
+[section:assert Static Assert]
+
+When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static assertions are reported. Define
+
+* __BOOST_RATIO_USES_STATIC_ASSERT to use Boost.StaticAssert.
+* __BOOST_RATIO_USES_MPL_ASSERT to use [*Boost.MPL] static assertions.
+* __BOOST_RATIO_USES_ARRAY_ASSERT to use __Boost_Ratio internal static assertions.
+
+The default behavior is as if __BOOST_RATIO_USES_ARRAY_ASSERT was defined.
+
+When __BOOST_RATIO_USES_MPL_ASSERT is not defined the following symbols are defined as shown:
+
+ #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"
+ #define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
+ #define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
+ #define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
+ #define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
+
+Depending upon the static assertion system used, a hint as to the failing assertion will appear in some form in the compiler diagnostic output.
+
+
+[endsect]
+[endsect]
+
+[/=================================================]
 [section:std C++0x Recommendation]
 [/=================================================]
 
@@ -707,46 +771,13 @@
 
 [endsect]
 
+
 [/=================================================]
 [section:ratio_hpp Header `<boost/ratio/ratio.hpp>`]
 [/=================================================]
 
 __ratio is a facility which is useful in specifying compile-time rational constants. Compile-time rational arithmetic is supported with protection against overflow and divide by zero. Such a facility is very handy to efficiently represent 1/3 of a nanosecond, or to specify an inch in terms of meters (for example 254/10000 meters - which __ratio will reduce to 127/5000 meters).
 
- // Configuration macros
- #define __BOOST_RATIO_USES_STATIC_ASSERT
- #define __BOOST_RATIO_USES_MPL_ASSERT
- #define __BOOST_RATIO_USES_ARRAY_ASSERT
- #define __BOOST_RATIO_EXTENSIONS
-
-
-[section:conf Configuration Macros]
-
-When BOOST_NO_STATIC_ASSERT is defined, the user can select the way static assertions are reported. Define
-
-* BOOST_RATIO_USES_STATIC_ASSERT to use Boost.StaticAssert.
-* BOOST_RATIO_USES_MPL_ASSERT to use [*Boost.MPL] static assertions.
-* BOOST_RATIO_USES_RATIO_ASSERT to use __Boost_Ratio static assertions.
-
-The default behavior is as if BOOST_RATIO_USES_ARRAY_ASSERT is defined.
-
-When BOOST_RATIO_USES_MPL_ASSERT is not defined the following symbols are defined as shown:
-
- #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"
- #define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
- #define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
- #define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
- #define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
-
-Depending upon the static assertion system used, a hint as to the failing assertion will appear in some form in the compiler diagnostic output.
-
-When BOOST_RATIO_EXTENSIONS is defined, __Boost_Ratio provides in addition some extenion to the C++ standard, see below.
-
-
-[endsect]
-
 [section:ratio Class Template `ratio<>`]
 
         template <boost::intmax_t N, boost::intmax_t D>
@@ -756,7 +787,7 @@
             static const boost::intmax_t den;
             typedef ratio<num, den> type;
 
- #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;
@@ -790,7 +821,7 @@
 
 [section:ca Construction and Assignment]
 
-Included only if BOOST_RATIO_EXTENSIONS is defined.
+Included only if __BOOST_RATIO_EXTENSIONS is defined.
 
 [heading Default Constructor]
 
@@ -822,7 +853,7 @@
 
 [section:mpl MPL Numeric Metafunctions]
 
-Included only if BOOST_RATIO_EXTENSIONS is defined.
+Included only if __BOOST_RATIO_EXTENSIONS is defined.
 
 In order to work with [*Boost.MPL] numeric metafunctions as a __Rational_Constant, the following has beed added:
 
@@ -834,7 +865,7 @@
 
 [section:obs Observers]
 
-Included only if BOOST_RATIO_EXTENSIONS is defined.
+Included only if __BOOST_RATIO_EXTENSIONS is defined.
 
             static value_type value();
             value_type operator()() const;
@@ -1031,16 +1062,238 @@
 This header provides `ratio_string<>` which can generate a textual representation of a `ratio<>` in the form of a `std::basic_string<>`. These strings can be useful for I/O.
 
     namespace boost {
+ template <class Ratio, class charT> struct ratio_string;
+
+ template <> struct ratio_string<atto, char>;
+ template <> struct ratio_string<atto, char16_t>;
+ template <> struct ratio_string<atto, char32_t>;
+ template <> struct ratio_string<atto, wchar_t>;
+
+ template <> struct ratio_string<femto, char>;
+ template <> struct ratio_string<femto, char16_t>;
+ template <> struct ratio_string<femto, char32_t>;
+ template <> struct ratio_string<femto, wchar_t>;
+
+ template <> struct ratio_string<pico, char>;
+ template <> struct ratio_string<pico, char16_t>;
+ template <> struct ratio_string<pico, char32_t>;
+ template <> struct ratio_string<pico, wchar_t>;
+
+ template <> struct ratio_string<nano, char>;
+ template <> struct ratio_string<nano, char16_t>;
+ template <> struct ratio_string<nano, char32_t>;
+ template <> struct ratio_string<nano, wchar_t>;
+
+ template <> struct ratio_string<micro, char>;
+ template <> struct ratio_string<micro, char16_t>;
+ template <> struct ratio_string<micro, char32_t>;
+ template <> struct ratio_string<micro, wchar_t>;
+
+ template <> struct ratio_string<milli, char>;
+ template <> struct ratio_string<milli, char16_t>;
+ template <> struct ratio_string<milli, char32_t>;
+ template <> struct ratio_string<milli, wchar_t>;
+
+ template <> struct ratio_string<centi, char>;
+ template <> struct ratio_string<centi, char16_t>;
+ template <> struct ratio_string<centi, char32_t>;
+ template <> struct ratio_string<centi, wchar_t>;
+
+ template <> struct ratio_string<deci, char>;
+ template <> struct ratio_string<deci, char16_t>;
+ template <> struct ratio_string<deci, char32_t>;
+ template <> struct ratio_string<deci, wchar_t>;
+
+ template <> struct ratio_string<deca, char>;
+ template <> struct ratio_string<deca, char16_t>;
+ template <> struct ratio_string<deca, char32_t>;
+ template <> struct ratio_string<deca, wchar_t>;
+
+ template <> struct ratio_string<hecto, char>;
+ template <> struct ratio_string<hecto, char16_t>;
+ template <> struct ratio_string<hecto, char32_t>;
+ template <> struct ratio_string<hecto, wchar_t>;
+
+ template <> struct ratio_string<kilo, char>;
+ template <> struct ratio_string<kilo, char16_t>;
+ template <> struct ratio_string<kilo, char32_t>;
+ template <> struct ratio_string<kilo, wchar_t>;
+
+ template <> struct ratio_string<mega, char>;
+ template <> struct ratio_string<mega, char16_t>;
+ template <> struct ratio_string<mega, char32_t>;
+ template <> struct ratio_string<mega, wchar_t>;
+
+ template <> struct ratio_string<giga, char>;
+ template <> struct ratio_string<giga, char16_t>;
+ template <> struct ratio_string<giga, char32_t>;
+ template <> struct ratio_string<giga, wchar_t>;
+
+ template <> struct ratio_string<tera, char>;
+ template <> struct ratio_string<tera, char16_t>;
+ template <> struct ratio_string<tera, char32_t>;
+ template <> struct ratio_string<tera, wchar_t>;
+
+ template <> struct ratio_string<peta, char>;
+ template <> struct ratio_string<peta, char16_t>;
+ template <> struct ratio_string<peta, char32_t>;
+ template <> struct ratio_string<peta, wchar_t>;
+
+ template <> struct ratio_string<exa, char>;
+ template <> struct ratio_string<exa, char16_t>;
+ template <> struct ratio_string<exa, char32_t>;
+ template <> struct ratio_string<exa, wchar_t>;
+ }
+
+[section:ratio_string Template Class `ratio_string<>`]
+
         template <class Ratio, class CharT>
         struct ratio_string
         {
- static std::basic_string<CharT> short_name();
- static std::basic_string<CharT> long_name();
+ static std::basic_string<CharT> symbol();
+ static std::basic_string<CharT> prefix();
+ static std::basic_string<CharT> short_name(); // DEPRECATED V2
+ static std::basic_string<CharT> long_name(); // DEPRECATED V2
         };
- }
+
+The class template ratio_string provides textual representations of the associated ratio appropriate for the character type charT.
+
+The primary template provides generic strings. Specializations provide the same static member functions but these functions return the English SI prefix and symbol names as specified by the General Conference on Weights and Measures.
+
+[section:prefix Static Member function `prefix()`]
+
+ template<class Ratio, class CharT>
+ basic_string<charT>
+ ratio_string<Ratio, CharT>::prefix();
+
+[*Returns]: A basic_string of the form: [Ratio::num/Ratio::den]
+
+[*Example]: `ratio_string<ratio<2, 60>, wchar_t>::prefix()` returns `L"[1/30]"`.
+
+[endsect]
+
+[section:symbol Static Member function `symbol()`]
+
+ template<class Ratio, class CharT>
+ basic_string<charT>
+ ratio_string<Ratio, CharT>::symbol();
+
+[*Returns]: prefix().
+
+
+[endsect]
+[section:long_name Static Member function `long_name()` DEPRECATED V2]
+
+ template<class Ratio, class CharT>
+ basic_string<charT>
+ ratio_string<Ratio, CharT>::long_name();
+
+[*Returns]: prefix().
+
+[endsect]
+[section:short_name Static Member function `short_name()` DEPRECATED V2]
+
+ template<class Ratio, class CharT>
+ basic_string<charT>
+ ratio_string<Ratio, CharT>::short_name();
+
+[*Returns]: symbol().
 
 [endsect]
 [endsect]
+
+
+[section:spe Specializations for `ratio_string<>`]
+
+For each specialization the table gives the return value for `prefix()` and `symbol()`.
+
+[table The return values of specializations of ratio_string
+ [[Specialization][`prefix()`] [`symbol()`]]
+ [[`ratio_string<atto, char>`][`"atto"`] [`"a"`]]
+ [[`ratio_string<atto, char16_t>`][`u"atto"`] [`u"a"`]]
+ [[`ratio_string<atto, char32_t>`][`U"atto"`] [`U"a"`]]
+ [[`ratio_string<atto, wchar_t>`][`L"atto"`] [`L"a"`]]
+
+ [[`ratio_string<femto, char>`][`"femto"`] [`"f"`]]
+ [[`ratio_string<femto, char16_t>`][`u"femto"`] [`u"f"`]]
+ [[`ratio_string<femto, char32_t>`][`U"femto"`] [`U"f"`]]
+ [[`ratio_string<femto, wchar_t>`][`L"femto"`] [`L"f"`]]
+
+ [[`ratio_string<pico, char>`][`"pico"`] [`"p"`]]
+ [[`ratio_string<pico, char16_t>`][`u"pico"`] [`u"p"`]]
+ [[`ratio_string<pico, char32_t>`][`U"pico"`] [`U"p"`]]
+ [[`ratio_string<pico, wchar_t>`][`L"pico"`] [`L"p"`]]
+
+ [[`ratio_string<nano, char>`][`"nano"`] [`"a"`]]
+ [[`ratio_string<nano, char16_t>`][`u"nano"`] [`u"a"`]]
+ [[`ratio_string<nano, char32_t>`][`U"nano"`] [`U"a"`]]
+ [[`ratio_string<nano, wchar_t>`][`L"nano"`] [`L"a"`]]
+
+ [[`ratio_string<micro, char>`][`"micro"`] [`u8"\u00B5"`]]
+ [[`ratio_string<micro, char16_t>`][`u"micro"`] [`u"\u00B5"`]]
+ [[`ratio_string<micro, char32_t>`][`U"micro"`] [`U"\u00B5"`]]
+ [[`ratio_string<micro, wchar_t>`][`L"micro"`] [`Lu8"\u00B5"`]]
+
+ [[`ratio_string<milli, char>`][`"milli"`] [`"m"`]]
+ [[`ratio_string<milli, char16_t>`][`u"milli"`] [`u"m"`]]
+ [[`ratio_string<milli, char32_t>`][`U"milli"`] [`U"m"`]]
+ [[`ratio_string<milli, wchar_t>`][`L"milli"`] [`L"m"`]]
+
+ [[`ratio_string<centi, char>`][`"centi"`] [`"c"`]]
+ [[`ratio_string<centi, char16_t>`][`u"centi"`] [`u"c"`]]
+ [[`ratio_string<centi, char32_t>`][`U"centi"`] [`U"c"`]]
+ [[`ratio_string<centi, wchar_t>`][`L"centi"`] [`L"c"`]]
+
+ [[`ratio_string<deci, char>`][`"deci"`] [`"d"`]]
+ [[`ratio_string<deci, char16_t>`][`u"deci"`] [`u"d"`]]
+ [[`ratio_string<deci, char32_t>`][`U"deci"`] [`U"d"`]]
+ [[`ratio_string<deci, wchar_t>`][`L"deci"`] [`L"d"`]]
+
+ [[`ratio_string<deca, char>`][`"deca"`] [`"da"`]]
+ [[`ratio_string<deca, char16_t>`][`u"deca"`] [`u"da"`]]
+ [[`ratio_string<deca, char32_t>`][`U"deca"`] [`U"da"`]]
+ [[`ratio_string<deca, wchar_t>`][`L"deca"`] [`L"da"`]]
+
+ [[`ratio_string<hecto, char>`][`"hecto"`] [`"h"`]]
+ [[`ratio_string<hecto, char16_t>`][`u"hecto"`] [`u"h"`]]
+ [[`ratio_string<hecto, char32_t>`][`U"hecto"`] [`U"h"`]]
+ [[`ratio_string<hecto, wchar_t>`][`L"hecto"`] [`L"h"`]]
+
+ [[`ratio_string<kilo, char>`][`"kilo"`] [`"k"`]]
+ [[`ratio_string<kilo, char16_t>`][`u"kilo"`] [`u"k"`]]
+ [[`ratio_string<kilo, char32_t>`][`U"kilo"`] [`U"k"`]]
+ [[`ratio_string<kilo, wchar_t>`][`L"kilo"`] [`L"k"`]]
+
+ [[`ratio_string<mega, char>`][`"mega"`] [`"M"`]]
+ [[`ratio_string<mega, char16_t>`][`u"mega"`] [`u"M"`]]
+ [[`ratio_string<mega, char32_t>`][`U"mega"`] [`U"M"`]]
+ [[`ratio_string<mega, wchar_t>`][`L"mega"`] [`L"M"`]]
+
+ [[`ratio_string<giga, char>`][`"giga"`] [`"G"`]]
+ [[`ratio_string<giga, char16_t>`][`u"giga"`] [`u"G"`]]
+ [[`ratio_string<giga, char32_t>`][`U"giga"`] [`U"G"`]]
+ [[`ratio_string<giga, wchar_t>`][`L"giga"`] [`L"G"`]]
+
+ [[`ratio_string<tera, char>`][`"tera"`] [`"T"`]]
+ [[`ratio_string<tera, char16_t>`][`u"tera"`] [`u"T"`]]
+ [[`ratio_string<tera, char32_t>`][`U"tera"`] [`U"T"`]]
+ [[`ratio_string<tera, wchar_t>`][`L"tera"`] [`L"T"`]]
+
+ [[`ratio_string<peta, char>`][`"peta"`] [`"P"`]]
+ [[`ratio_string<peta, char16_t>`][`u"peta"`] [`u"P"`]]
+ [[`ratio_string<peta, char32_t>`][`U"peta"`] [`U"P"`]]
+ [[`ratio_string<peta, wchar_t>`][`L"peta"`] [`L"P"`]]
+
+ [[`ratio_string<exa, char>`][`"exa"`] [`"E"`]]
+ [[`ratio_string<exa, char16_t>`][`u"exa"`] [`u"E"`]]
+ [[`ratio_string<exa, char32_t>`][`U"exa"`] [`U"E"`]]
+ [[`ratio_string<exa, wchar_t>`][`L"exa"`] [`L"E"`]]
+
+]
+
+[endsect]
+[endsect]
+[endsect]
 [section:mpl Rational Constant]
 
 [/===========================================]
@@ -1596,6 +1849,18 @@
 [section:history Appendix A: History]
 [/==================================]
 
+[section [*Version 2.0.0, November 1, 2012 - 1.52] ]
+
+[*Features:]
+
+* [@http://svn.boost.org/trac/boost/ticket/XXXX #XXXX] Replace the short_name and long_name functions by symbol and prefix functions respectively.
+
+[*Deprecated:]
+
+The ratio_string<>::short_name and ratio_string<>::long_name are deprecated. Use ratio_string<>::symbol and ratio_string<>::prefix respectively. These functions be removed in 1.55.
+
+[endsect]
+
 [section [*Version 1.0.3, August 1, 2012 - 1.51] ]
 
 [*Fixes:]

Modified: branches/release/libs/ratio/example/display_ex.cpp
==============================================================================
--- branches/release/libs/ratio/example/display_ex.cpp (original)
+++ branches/release/libs/ratio/example/display_ex.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -19,21 +19,21 @@
     using namespace std;
     using namespace boost;
 
- cout << "ratio_string<deca, char>::long_name() = "
- << ratio_string<boost::deca, char>::long_name() << '\n';
- cout << "ratio_string<deca, char>::short_name() = "
- << ratio_string<boost::deca, char>::short_name() << '\n';
+ cout << "ratio_string<deca, char>::prefix() = "
+ << ratio_string<boost::deca, char>::prefix() << '\n';
+ cout << "ratio_string<deca, char>::symbol() = "
+ << ratio_string<boost::deca, char>::symbol() << '\n';
 
- cout << "ratio_string<giga, char>::long_name() = "
- << ratio_string<boost::giga, char>::long_name() << '\n';
- cout << "ratio_string<giga, char>::short_name() = "
- << ratio_string<boost::giga, char>::short_name() << '\n';
+ cout << "ratio_string<giga, char>::prefix() = "
+ << ratio_string<boost::giga, char>::prefix() << '\n';
+ cout << "ratio_string<giga, char>::symbol() = "
+ << ratio_string<boost::giga, char>::symbol() << '\n';
+
+ cout << "ratio_string<ratio<4, 6>, char>::prefix() = "
+ << ratio_string<boost::ratio<4, 6>, char>::prefix() << '\n';
+ cout << "ratio_string<ratio<4, 6>, char>::symbol() = "
+ << ratio_string<boost::ratio<4, 6>, char>::symbol() << '\n';
 
- cout << "ratio_string<ratio<4, 6>, char>::long_name() = "
- << ratio_string<boost::ratio<4, 6>, char>::long_name() << '\n';
- cout << "ratio_string<ratio<4, 6>, char>::short_name() = "
- << ratio_string<boost::ratio<4, 6>, char>::short_name() << '\n';
-
     return 0;
 }
 

Modified: branches/release/libs/ratio/example/duration.hpp
==============================================================================
--- branches/release/libs/ratio/example/duration.hpp (original)
+++ branches/release/libs/ratio/example/duration.hpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -72,7 +72,7 @@
 
 namespace boost_ex {
     using boost::ratio;
-
+
 namespace chrono {
 
   template <class Rep, class Period = ratio<1> >
@@ -387,22 +387,22 @@
     struct chrono_numeric_limits {
         static T lowest() throw() {return (std::numeric_limits<T>::min) ();}
     };
-
+
     template <class T>
     struct chrono_numeric_limits<T,true> {
         static T lowest() throw() {return (std::numeric_limits<T>::min) ();}
     };
-
+
     template <>
     struct chrono_numeric_limits<float,true> {
         static float lowest() throw() {return -(std::numeric_limits<float>::max) ();}
     };
-
+
     template <>
     struct chrono_numeric_limits<double,true> {
         static double lowest() throw() {return -(std::numeric_limits<double>::max) ();}
     };
-
+
     template <>
     struct chrono_numeric_limits<long double,true> {
         static long double lowest() throw() {return -(std::numeric_limits<long double>::max)();}
@@ -410,14 +410,14 @@
 
     template <class T>
     struct numeric_limits : chrono_numeric_limits<typename boost::remove_cv<T>::type> {};
-
- }
+
+ }
   template <class Rep>
   struct duration_values
   {
       static Rep zero() {return Rep(0);}
       static Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (std::numeric_limits<Rep>::max)();}
-
+
       static Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () {return detail::numeric_limits<Rep>::lowest();}
   };
 
@@ -443,7 +443,7 @@
 //----------------------------------------------------------------------------//
 
 namespace boost_ex {
-
+
 namespace chrono {
 
     template <class Rep, class Period>
@@ -465,11 +465,11 @@
 #if (defined(BOOST_MSVC) && (BOOST_MSVC == 1500)) || defined(__IBMCPP__)
 #else
    , typename boost::enable_if <
- boost::mpl::and_ <
+ boost::mpl::and_ <
                         boost::is_convertible<Rep2, rep>,
                         boost::mpl::or_ <
                             treat_as_floating_point<rep>,
- boost::mpl::and_ <
+ boost::mpl::and_ <
                                 boost::mpl::not_ < treat_as_floating_point<rep> >,
                                 boost::mpl::not_ < treat_as_floating_point<Rep2> >
>
@@ -493,9 +493,9 @@
 #if (defined(BOOST_MSVC) && (BOOST_MSVC == 1500)) || defined(__IBMCPP__)
 #else
     , typename boost::enable_if <
- boost::mpl::or_ <
+ boost::mpl::or_ <
                         treat_as_floating_point<rep>,
- boost::mpl::and_ <
+ boost::mpl::and_ <
                             boost::mpl::bool_ < boost::ratio_divide<Period2, period>::type::den == 1>,
                             boost::mpl::not_ < treat_as_floating_point<Rep2> >
>
@@ -580,13 +580,13 @@
     duration<typename boost::common_type<Rep1, Rep2>::type, Period>
 #else
 typename boost::enable_if <
- boost::mpl::and_ <
- boost::is_convertible<Rep1, typename boost::common_type<Rep1, Rep2>::type>,
+ boost::mpl::and_ <
+ boost::is_convertible<Rep1, typename boost::common_type<Rep1, Rep2>::type>,
         boost::is_convertible<Rep2, typename boost::common_type<Rep1, Rep2>::type>
>,
     duration<typename boost::common_type<Rep1, Rep2>::type, Period>
>::type
-#endif
+#endif
   operator*(const duration<Rep1, Period>& d, const Rep2& s)
   {
       typedef typename boost::common_type<Rep1, Rep2>::type CR;
@@ -601,13 +601,13 @@
     duration<typename boost::common_type<Rep1, Rep2>::type, Period>
 #else
   typename boost::enable_if <
- boost::mpl::and_ <
+ boost::mpl::and_ <
         boost::is_convertible<Rep1, typename boost::common_type<Rep1, Rep2>::type>,
         boost::is_convertible<Rep2, typename boost::common_type<Rep1, Rep2>::type>
>,
     duration<typename boost::common_type<Rep1, Rep2>::type, Period>
>::type
-#endif
+#endif
   operator*(const Rep1& s, const duration<Rep2, Period>& d)
   {
       return d * s;
@@ -788,12 +788,12 @@
     ToDuration
 #else
   typename boost::enable_if <boost_ex::chrono::detail::is_duration<ToDuration>, ToDuration>::type
-#endif
+#endif
   duration_cast(const duration<Rep, Period>& fd)
   {
       return boost_ex::chrono::detail::duration_cast<duration<Rep, Period>, ToDuration>()(fd);
   }
 
-}
+}
 }
 #endif // BOOST_EX_CHRONO_DURATION_HPP

Modified: branches/release/libs/ratio/test/Jamfile.v2
==============================================================================
--- branches/release/libs/ratio/test/Jamfile.v2 (original)
+++ branches/release/libs/ratio/test/Jamfile.v2 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -26,7 +26,11 @@
         <toolset>msvc:<asynch-exceptions>on
         <define>BOOST_ENABLE_WARNINGS
         <define>BOOST_RATIO_USES_MPL_ASSERT
+ <define>BOOST_RATIO_VERSION=2
         <define>BOOST_MPL_NEXT_PRIOR_EXT
+ #<toolset>sun:<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
+ #<toolset>sun:<define>BOOST_TYPEOF_EMULATION
+ <toolset>sun:<define>__typeof__=__typeof__
         <warnings>all
         <toolset>gcc:<cxxflags>-Wextra
         <toolset>gcc:<cxxflags>-Wno-long-long
@@ -118,3 +122,7 @@
 
         ;
 
+ #test-suite "tickets"
+ # :
+ # [ run test_6498_pass.cpp ]
+ # ;

Modified: branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp (original)
+++ branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_fail.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -18,11 +18,10 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX boost::integer_traits<boost::intmax_t>::const_max
 
-typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, 1> R1;
+typedef boost::ratio<boost::integer_traits<boost::intmax_t>::const_max, 1> R1;
 typedef boost::ratio<1, 1> R2;
 typedef boost::ratio_add<R1, R2>::type RT;
 
-BOOST_RATIO_STATIC_ASSERT(RT::num==BOOST_RATIO_INTMAX_T_MAX+1, NOTHING, (RT));
+BOOST_RATIO_STATIC_ASSERT(RT::num==boost::integer_traits<boost::intmax_t>::const_max+1, NOTHING, (RT));
 BOOST_RATIO_STATIC_ASSERT(RT::den==1, NOTHING, (RT));

Modified: branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_arithmetic/ratio_add_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -71,7 +71,7 @@
     BOOST_RATIO_STATIC_ASSERT(R::num == 127970191639601LL && R::den == 5177331081415LL, NOTHING, ());
     }
     {
- typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
+ typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, 1> R1;
     typedef boost::ratio<-1, 1> R2;
     typedef boost::ratio_add<R1, R2>::type RT;
     }

Modified: branches/release/libs/ratio/test/ratio_arithmetic/ratio_divide_fail.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_arithmetic/ratio_divide_fail.cpp (original)
+++ branches/release/libs/ratio/test/ratio_arithmetic/ratio_divide_fail.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -15,6 +15,6 @@
 
 #include <boost/ratio/ratio.hpp>
 
-typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
+typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, 1> R1;
 typedef boost::ratio<1,2> R2;
 typedef boost::ratio_divide<R1, R2>::type RT;

Modified: branches/release/libs/ratio/test/ratio_arithmetic/ratio_multiply_fail.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_arithmetic/ratio_multiply_fail.cpp (original)
+++ branches/release/libs/ratio/test/ratio_arithmetic/ratio_multiply_fail.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -15,6 +15,6 @@
 
 #include <boost/ratio/ratio.hpp>
 
-typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
+typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, 1> R1;
 typedef boost::ratio<2,1> R2;
 typedef boost::ratio_multiply<R1, R2>::type RT;

Modified: branches/release/libs/ratio/test/ratio_comparison/ratio_equal_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_comparison/ratio_equal_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_comparison/ratio_equal_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -18,7 +18,6 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_comparison/ratio_greater_equal_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_comparison/ratio_greater_equal_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_comparison/ratio_greater_equal_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -16,7 +16,6 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_comparison/ratio_greater_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_comparison/ratio_greater_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_comparison/ratio_greater_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -15,7 +15,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_comparison/ratio_less_equal_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_comparison/ratio_less_equal_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_comparison/ratio_less_equal_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -15,7 +15,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_comparison/ratio_less_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_comparison/ratio_less_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_comparison/ratio_less_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -16,7 +16,6 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 void test()
 {
     {

Modified: branches/release/libs/ratio/test/ratio_comparison/ratio_not_equal_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_comparison/ratio_not_equal_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_comparison/ratio_not_equal_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -15,7 +15,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_equal_to_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_equal_to_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_equal_to_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -20,7 +20,6 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_greater_equal_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_greater_equal_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_greater_equal_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -18,7 +18,6 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_greater_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_greater_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_greater_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -17,7 +17,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_less_equal_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_less_equal_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_less_equal_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -17,7 +17,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_less_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_less_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_less_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -18,7 +18,6 @@
 #define NOTHING ""
 #endif
 
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 void test()
 {
     {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_not_equal_to_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_not_equal_to_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_not_equal_to_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -17,7 +17,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 void test()
 {

Modified: branches/release/libs/ratio/test/ratio_extensions/mpl_plus_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_extensions/mpl_plus_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_extensions/mpl_plus_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -72,7 +72,7 @@
     BOOST_RATIO_STATIC_ASSERT(R::num == 127970191639601LL && R::den == 5177331081415LL, NOTHING, ());
     }
     {
- typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), 1> R1;
+ typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, 1> R1;
     typedef boost::ratio<-1, 1> R2;
     typedef boost::mpl::int_<0> R3;
     typedef boost::mpl::plus<R1, R2, R3>::type RT;

Modified: branches/release/libs/ratio/test/ratio_io/ratio_io_fail.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_io/ratio_io_fail.cpp (original)
+++ branches/release/libs/ratio/test/ratio_io/ratio_io_fail.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -17,6 +17,6 @@
 typedef boost::ratio_string<int, char> R1;
 
 void test() {
-
- std::string str = R1::short_name();
+
+ std::string str = R1::symbol();
 }

Modified: branches/release/libs/ratio/test/ratio_io/ratio_io_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_io/ratio_io_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_io/ratio_io_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -22,130 +22,130 @@
 
     {
         BOOST_TEST((
- boost::ratio_string<boost::atto, char>::long_name() == "atto"
+ boost::ratio_string<boost::atto, char>::prefix() == "atto"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::atto, char>::short_name() == "a"
+ boost::ratio_string<boost::atto, char>::symbol() == "a"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::femto, char>::long_name() == "femto"
+ boost::ratio_string<boost::femto, char>::prefix() == "femto"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::femto, char>::short_name() == "f"
+ boost::ratio_string<boost::femto, char>::symbol() == "f"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::pico, char>::long_name() == "pico"
+ boost::ratio_string<boost::pico, char>::prefix() == "pico"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::pico, char>::short_name() == "p"
+ boost::ratio_string<boost::pico, char>::symbol() == "p"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::nano, char>::long_name() == "nano"
+ boost::ratio_string<boost::nano, char>::prefix() == "nano"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::nano, char>::short_name() == "n"
+ boost::ratio_string<boost::nano, char>::symbol() == "n"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::micro, char>::long_name() == "micro"
+ boost::ratio_string<boost::micro, char>::prefix() == "micro"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::micro, char>::short_name() == "\xC2\xB5"
+ boost::ratio_string<boost::micro, char>::symbol() == "\xC2\xB5"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::milli, char>::long_name() == "milli"
+ boost::ratio_string<boost::milli, char>::prefix() == "milli"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::milli, char>::short_name() == "m"
+ boost::ratio_string<boost::milli, char>::symbol() == "m"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::centi, char>::long_name() == "centi"
+ boost::ratio_string<boost::centi, char>::prefix() == "centi"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::centi, char>::short_name() == "c"
+ boost::ratio_string<boost::centi, char>::symbol() == "c"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::deci, char>::long_name() == "deci"
+ boost::ratio_string<boost::deci, char>::prefix() == "deci"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::deci, char>::short_name() == "d"
+ boost::ratio_string<boost::deci, char>::symbol() == "d"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::deca, char>::long_name() == "deca"
+ boost::ratio_string<boost::deca, char>::prefix() == "deca"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::deca, char>::short_name() == "da"
+ boost::ratio_string<boost::deca, char>::symbol() == "da"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::hecto, char>::long_name() == "hecto"
+ boost::ratio_string<boost::hecto, char>::prefix() == "hecto"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::hecto, char>::short_name() == "h"
+ boost::ratio_string<boost::hecto, char>::symbol() == "h"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::kilo, char>::long_name() == "kilo"
+ boost::ratio_string<boost::kilo, char>::prefix() == "kilo"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::kilo, char>::short_name() == "k"
+ boost::ratio_string<boost::kilo, char>::symbol() == "k"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::mega, char>::long_name() == "mega"
+ boost::ratio_string<boost::mega, char>::prefix() == "mega"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::mega, char>::short_name() == "M"
+ boost::ratio_string<boost::mega, char>::symbol() == "M"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::giga, char>::long_name() == "giga"
+ boost::ratio_string<boost::giga, char>::prefix() == "giga"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::giga, char>::short_name() == "G"
+ boost::ratio_string<boost::giga, char>::symbol() == "G"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::tera, char>::long_name() == "tera"
+ boost::ratio_string<boost::tera, char>::prefix() == "tera"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::tera, char>::short_name() == "T"
+ boost::ratio_string<boost::tera, char>::symbol() == "T"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::peta, char>::long_name() == "peta"
+ boost::ratio_string<boost::peta, char>::prefix() == "peta"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::peta, char>::short_name() == "P"
+ boost::ratio_string<boost::peta, char>::symbol() == "P"
         ));
     }
     {
         BOOST_TEST((
- boost::ratio_string<boost::exa, char>::long_name() == "exa"
+ boost::ratio_string<boost::exa, char>::prefix() == "exa"
         ));
         BOOST_TEST((
- boost::ratio_string<boost::exa, char>::short_name() == "E"
+ boost::ratio_string<boost::exa, char>::symbol() == "E"
         ));
     }
 // return 1;

Modified: branches/release/libs/ratio/test/ratio_ratio/ratio_pass.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_ratio/ratio_pass.cpp (original)
+++ branches/release/libs/ratio/test/ratio_ratio/ratio_pass.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -19,7 +19,6 @@
 #if !defined(BOOST_NO_STATIC_ASSERT)
 #define NOTHING ""
 #endif
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFFLL)
 
 template <long long N, long long D, long long eN, long long eD>
 void test()
@@ -46,10 +45,10 @@
     test<222, -333, -2, 3>();
     test<-222, 333, -2, 3>();
     test<-222, -333, 2, 3>();
- test<BOOST_RATIO_INTMAX_T_MAX, 127, 72624976668147841LL, 1>();
- test<-BOOST_RATIO_INTMAX_T_MAX, 127, -72624976668147841LL, 1>();
- test<BOOST_RATIO_INTMAX_T_MAX, -127, -72624976668147841LL, 1>();
- test<-BOOST_RATIO_INTMAX_T_MAX, -127, 72624976668147841LL, 1>();
+ //test<BOOST_RATIO_INTMAX_T_MAX, 127, 72624976668147841LL, 1>();
+ //test<-BOOST_RATIO_INTMAX_T_MAX, 127, -72624976668147841LL, 1>();
+ //test<BOOST_RATIO_INTMAX_T_MAX, -127, -72624976668147841LL, 1>();
+ //test<-BOOST_RATIO_INTMAX_T_MAX, -127, 72624976668147841LL, 1>();
     //~ test<BOOST_RATIO_INTMAX_T_MAX, 127, BOOST_RATIO_INTMAX_T_MAX, 127>();
     //~ test<-BOOST_RATIO_INTMAX_T_MAX, 127, -BOOST_RATIO_INTMAX_T_MAX, 127>();
     //~ test<BOOST_RATIO_INTMAX_T_MAX, -127, -BOOST_RATIO_INTMAX_T_MAX, 127>();

Modified: branches/release/libs/ratio/test/ratio_test.cpp
==============================================================================
--- branches/release/libs/ratio/test/ratio_test.cpp (original)
+++ branches/release/libs/ratio/test/ratio_test.cpp 2012-09-05 07:03:16 EDT (Wed, 05 Sep 2012)
@@ -19,7 +19,7 @@
 
 // Test the case described in library working group issue 948.
 
-typedef boost::ratio<BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFFF), BOOST_RATIO_INTMAX_C(0x7FFFFFFFFFFFFFF0)> R1;
+typedef boost::ratio<BOOST_RATIO_INTMAX_T_MAX, BOOST_RATIO_INTMAX_T_MAX-16> R1;
 typedef boost::ratio<8, 7> R2;
 typedef boost::ratio_multiply<R1, R2>::type RT;
 


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