Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78436 - in trunk: boost/chrono/io boost/chrono/stopwatches/formatters libs/chrono/build libs/chrono/doc libs/chrono/example libs/chrono/test/io
From: vicente.botet_at_[hidden]
Date: 2012-05-12 13:28:02


Author: viboes
Date: 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
New Revision: 78436
URL: http://svn.boost.org/trac/boost/changeset/78436

Log:
Chrono: make use of scoped enum emulation fro duration_style and timezone
Text files modified:
   trunk/boost/chrono/io/duration_io.hpp | 6
   trunk/boost/chrono/io/duration_style.hpp | 16 +-
   trunk/boost/chrono/io/duration_units.hpp | 152 +++++++++++-----------
   trunk/boost/chrono/io/ios_base_state.hpp | 16 +-
   trunk/boost/chrono/io/time_point_io.hpp | 24 +-
   trunk/boost/chrono/io/timezone.hpp | 16 -
   trunk/boost/chrono/stopwatches/formatters/base_formatter.hpp | 4
   trunk/libs/chrono/build/Jamfile.v2 | 4
   trunk/libs/chrono/doc/chrono.qbk | 257 ++++++++++++++++++---------------------
   trunk/libs/chrono/example/french.cpp | 6
   trunk/libs/chrono/test/io/duration_output.cpp | 4
   trunk/libs/chrono/test/io/time_point_output.cpp | 2
   12 files changed, 245 insertions(+), 262 deletions(-)

Modified: trunk/boost/chrono/io/duration_io.hpp
==============================================================================
--- trunk/boost/chrono/io/duration_io.hpp (original)
+++ trunk/boost/chrono/io/duration_io.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -31,13 +31,13 @@
 
     class duration_fmt: public manip<duration_fmt>
     {
- duration_style::type style_;
+ duration_style style_;
     public:
 
       /**
        * explicit manipulator constructor from a @c duration_style
        */
- explicit duration_fmt(duration_style::type style)BOOST_NOEXCEPT
+ explicit duration_fmt(duration_style style)BOOST_NOEXCEPT
       : style_(style)
       {}
 
@@ -62,7 +62,7 @@
       //! the type of the state to restore
       typedef std::ios_base state_type;
       //! the type of aspect to save
- typedef duration_style::type aspect_type;
+ typedef duration_style aspect_type;
 
       /**
        * Explicit construction from an i/o stream.

Modified: trunk/boost/chrono/io/duration_style.hpp
==============================================================================
--- trunk/boost/chrono/io/duration_style.hpp (original)
+++ trunk/boost/chrono/io/duration_style.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -9,7 +9,8 @@
 
 #ifndef BOOST_CHRONO_IO_DURATION_STYLE_HPP
 #define BOOST_CHRONO_IO_DURATION_STYLE_HPP
-#include <iostream>
+
+#include <boost/detail/scoped_enum_emulation.hpp>
 
 namespace boost
 {
@@ -20,14 +21,11 @@
      * prefix means duration::rep with whatever stream/locale settings are set for it followed by a long name representing the unit
      * symbol means duration::rep with whatever stream/locale settings are set for it followed by a SI unit abbreviation
      */
- struct duration_style
- {
- enum type
- {
- prefix, symbol
- };
- };
- typedef duration_style::type duration_style_type;
+ BOOST_SCOPED_ENUM_DECLARE_BEGIN(duration_style)
+ {
+ prefix, symbol
+ }
+ BOOST_SCOPED_ENUM_DECLARE_END(duration_style)
 
 
   } // chrono

Modified: trunk/boost/chrono/io/duration_units.hpp
==============================================================================
--- trunk/boost/chrono/io/duration_units.hpp (original)
+++ trunk/boost/chrono/io/duration_units.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -121,7 +121,7 @@
        * @return the unit associated to this duration.
        */
       template <typename Rep, typename Period>
- string_type get_unit(duration_style::type style, duration<Rep, Period> const& d) const
+ string_type get_unit(duration_style style, duration<Rep, Period> const& d) const
       {
         return do_get_unit(style, rt_ratio(Period()), static_cast<intmax_t>(d.count()));
       }
@@ -130,7 +130,7 @@
        * @return the [N/D] suffix unit associated to this duration.
        */
       template <typename Rep, typename Period>
- string_type get_n_d_unit(duration_style::type style, duration<Rep, Period> const& d) const
+ string_type get_n_d_unit(duration_style style, duration<Rep, Period> const& d) const
       {
         return do_get_n_d_unit(style, rt_ratio(Period()), static_cast<intmax_t>(d.count()));
       }
@@ -157,11 +157,11 @@
       /**
        * @return the [N/D] suffix unit associated to this duration.
        */
- virtual string_type do_get_n_d_unit(duration_style::type style, rt_ratio rt, intmax_t v) const = 0;
+ virtual string_type do_get_n_d_unit(duration_style style, rt_ratio rt, intmax_t v) const = 0;
       /**
        * @return the unit associated to this duration.
        */
- virtual string_type do_get_unit(duration_style::type style,rt_ratio rt, intmax_t v) const = 0;
+ virtual string_type do_get_unit(duration_style style,rt_ratio rt, intmax_t v) const = 0;
       /**
        * @return true if the unit associated to the given Period is named, false otherwise.
        */
@@ -413,7 +413,7 @@
        * In English the suffix used after [N/D] is the one associated to the period ratio<1>.
        * @return the [N/D] suffix unit associated to this duration.
        */
- string_type do_get_n_d_unit(duration_style::type style, rt_ratio, intmax_t v) const
+ string_type do_get_n_d_unit(duration_style style, rt_ratio, intmax_t v) const
       {
         return do_get_unit(style, ratio<1>(), do_get_plural_form(v));
       }
@@ -421,7 +421,7 @@
       /**
        * @return the unit associated to this duration if it is named, "" otherwise.
        */
- string_type do_get_unit(duration_style::type style, rt_ratio rt, intmax_t v) const
+ string_type do_get_unit(duration_style style, rt_ratio rt, intmax_t v) const
       {
         if (rt.num==1) {
           switch (rt.den)
@@ -511,11 +511,11 @@
        * @param pf the requested plural form.
        * @return if style is symbol returns "s", otherwise if pf is 0 return "second", if pf is 1 "seconds"
        */
- virtual string_type do_get_unit(duration_style_type style, ratio<1> u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, ratio<1> u, std::size_t pf) const
       {
         return static_get_unit(style,u,pf);
       }
- static string_type static_get_unit(duration_style_type style, ratio<1> , std::size_t pf)
+ static string_type static_get_unit(duration_style style, ratio<1> , std::size_t pf)
       {
         static const CharT t[] =
         { 's' };
@@ -549,11 +549,11 @@
        * @param pf the requested plural form.
        * @return if style is symbol returns "min", otherwise if pf is 0 return "minute", if pf is 1 "minutes"
        */
- virtual string_type do_get_unit(duration_style_type style, ratio<60> u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, ratio<60> u, std::size_t pf) const
       {
         return static_get_unit(style,u,pf);
       }
- static string_type static_get_unit(duration_style_type style, ratio<60> , std::size_t pf)
+ static string_type static_get_unit(duration_style style, ratio<60> , std::size_t pf)
       {
         static const CharT t[] =
         { 'm', 'i', 'n' };
@@ -579,11 +579,11 @@
        * @param pf the requested plural form.
        * @return if style is symbol returns "h", otherwise if pf is 0 return "hour", if pf is 1 "hours"
        */
- virtual string_type do_get_unit(duration_style_type style, ratio<3600> u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, ratio<3600> u, std::size_t pf) const
       {
         return static_get_unit(style,u,pf);
       }
- static string_type static_get_unit(duration_style_type style, ratio<3600> , std::size_t pf)
+ static string_type static_get_unit(duration_style style, ratio<3600> , std::size_t pf)
       {
         static const CharT t[] =
         { 'h' };
@@ -607,11 +607,11 @@
        * @param pf the requested plural form.
        * @return the concatenation of the prefix associated to @c period + the one associated to seconds.
        */
- virtual string_type do_get_unit(duration_style_type style, atto u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, atto u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, atto u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, atto u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
@@ -621,11 +621,11 @@
        * @param pf the requested plural form.
        * @return the concatenation of the prefix associated to period @c u + the one associated to seconds.
        */
- virtual string_type do_get_unit(duration_style_type style, femto u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, femto u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, femto u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, femto u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
@@ -635,115 +635,115 @@
        * @param pf the requested plural form.
        * @return the concatenation of the prefix associated to period @c u + the one associated to seconds.
        */
- virtual string_type do_get_unit(duration_style_type style, pico u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, pico u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, pico u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, pico u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, nano u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, nano u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, nano u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, nano u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, micro u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, micro u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, micro u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, micro u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, milli u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, milli u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, milli u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, milli u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, centi u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, centi u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, centi u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, centi u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, deci u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, deci u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, deci u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, deci u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, deca u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, deca u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, deca u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, deca u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, hecto u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, hecto u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, hecto u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, hecto u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, kilo u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, kilo u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, kilo u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, kilo u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, mega u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, mega u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, mega u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, mega u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, giga u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, giga u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, giga u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, giga u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, tera u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, tera u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, tera u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, tera u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, peta u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, peta u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, peta u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, peta u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
- virtual string_type do_get_unit(duration_style_type style, exa u, std::size_t pf) const
+ virtual string_type do_get_unit(duration_style style, exa u, std::size_t pf) const
       {
         return do_get_ratio_prefix(style, u) + do_get_unit(style, ratio<1> (), pf);
       }
- static string_type static_get_unit(duration_style_type style, exa u, std::size_t pf)
+ static string_type static_get_unit(duration_style style, exa u, std::size_t pf)
       {
         return static_get_ratio_prefix(style, u) + static_get_unit(style, ratio<1> (), pf);
       }
@@ -755,146 +755,146 @@
        * @param u the period tag atto.
        * @return depending on the value of @c style return the ratio_string symbol or prefix.
        */
- virtual string_type do_get_ratio_prefix(duration_style_type style, atto u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, atto u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, atto)
+ static string_type static_get_ratio_prefix(duration_style style, atto)
       {
         if (style == duration_style::symbol) return ratio_string<atto, CharT>::symbol();
         return ratio_string<atto, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, femto u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, femto u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, femto)
+ static string_type static_get_ratio_prefix(duration_style style, femto)
       {
         if (style == duration_style::symbol) return ratio_string<femto, CharT>::symbol();
         return ratio_string<femto, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, pico u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, pico u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, pico)
+ static string_type static_get_ratio_prefix(duration_style style, pico)
       {
         if (style == duration_style::symbol) return ratio_string<pico, CharT>::symbol();
         return ratio_string<pico, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, nano u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, nano u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, nano)
+ static string_type static_get_ratio_prefix(duration_style style, nano)
       {
         if (style == duration_style::symbol) return ratio_string<nano, CharT>::symbol();
         return ratio_string<nano, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, micro u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, micro u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, micro)
+ static string_type static_get_ratio_prefix(duration_style style, micro)
       {
         if (style == duration_style::symbol) return ratio_string<micro, CharT>::symbol();
         return ratio_string<micro, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, milli u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, milli u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, milli)
+ static string_type static_get_ratio_prefix(duration_style style, milli)
       {
         if (style == duration_style::symbol) return ratio_string<milli, CharT>::symbol();
         return ratio_string<milli, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, centi u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, centi u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, centi)
+ static string_type static_get_ratio_prefix(duration_style style, centi)
       {
         if (style == duration_style::symbol) return ratio_string<centi, CharT>::symbol();
         return ratio_string<centi, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, deci u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, deci u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, deci)
+ static string_type static_get_ratio_prefix(duration_style style, deci)
       {
         if (style == duration_style::symbol) return ratio_string<deci, CharT>::symbol();
         return ratio_string<deci, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, deca u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, deca u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, deca)
+ static string_type static_get_ratio_prefix(duration_style style, deca)
       {
         if (style == duration_style::symbol) return ratio_string<deca, CharT>::symbol();
         return ratio_string<deca, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, hecto u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, hecto u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, hecto)
+ static string_type static_get_ratio_prefix(duration_style style, hecto)
       {
         if (style == duration_style::symbol) return ratio_string<hecto, CharT>::symbol();
         return ratio_string<hecto, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, kilo u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, kilo u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, kilo)
+ static string_type static_get_ratio_prefix(duration_style style, kilo)
       {
         if (style == duration_style::symbol) return ratio_string<kilo, CharT>::symbol();
         return ratio_string<kilo, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, mega u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, mega u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, mega)
+ static string_type static_get_ratio_prefix(duration_style style, mega)
       {
         if (style == duration_style::symbol) return ratio_string<mega, CharT>::symbol();
         return ratio_string<mega, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, giga u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, giga u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, giga)
+ static string_type static_get_ratio_prefix(duration_style style, giga)
       {
         if (style == duration_style::symbol) return ratio_string<giga, CharT>::symbol();
         return ratio_string<giga, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, tera u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, tera u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, tera)
+ static string_type static_get_ratio_prefix(duration_style style, tera)
       {
         if (style == duration_style::symbol) return ratio_string<tera, CharT>::symbol();
         return ratio_string<tera, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, peta u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, peta u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, peta)
+ static string_type static_get_ratio_prefix(duration_style style, peta)
       {
         if (style == duration_style::symbol) return ratio_string<peta, CharT>::symbol();
         return ratio_string<peta, CharT>::prefix();
       }
- virtual string_type do_get_ratio_prefix(duration_style_type style, exa u) const
+ virtual string_type do_get_ratio_prefix(duration_style style, exa u) const
       {
         return static_get_ratio_prefix(style, u);
       }
- static string_type static_get_ratio_prefix(duration_style_type style, exa)
+ static string_type static_get_ratio_prefix(duration_style style, exa)
       {
         if (style == duration_style::symbol) return ratio_string<exa, CharT>::symbol();
         return ratio_string<exa, CharT>::prefix();

Modified: trunk/boost/chrono/io/ios_base_state.hpp
==============================================================================
--- trunk/boost/chrono/io/ios_base_state.hpp (original)
+++ trunk/boost/chrono/io/ios_base_state.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -32,11 +32,11 @@
         uses_local = 1 << 1
       };
 
- inline duration_style::type get_duration_style()
+ inline duration_style get_duration_style()
       {
         return (flags() & uses_symbol) ? duration_style::symbol : duration_style::prefix;
       }
- inline void set_duration_style(duration_style::type style)
+ inline void set_duration_style(duration_style style)
       {
         if (style == duration_style::symbol)
           setf(uses_symbol);
@@ -44,11 +44,11 @@
           unsetf(uses_symbol);
       }
 
- inline timezone_type get_timezone()
+ inline timezone get_timezone()
       {
         return (flags() & uses_local) ? timezone::local : timezone::utc;
       }
- inline void set_timezone(timezone_type tz)
+ inline void set_timezone(timezone tz)
       {
         if (tz == timezone::local)
           setf(uses_local);
@@ -64,11 +64,11 @@
       } // namespace
     } // namespace detail
 
- inline duration_style::type get_duration_style(std::ios_base & ios)
+ inline duration_style get_duration_style(std::ios_base & ios)
     {
       return fmt_masks(ios).get_duration_style();
     }
- inline void set_duration_style(std::ios_base& ios, duration_style::type style)
+ inline void set_duration_style(std::ios_base& ios, duration_style style)
     {
       fmt_masks(ios).set_duration_style(style);
     }
@@ -83,11 +83,11 @@
       return ios;
     }
 
- inline timezone_type get_timezone(std::ios_base & ios)
+ inline timezone get_timezone(std::ios_base & ios)
     {
       return fmt_masks(ios).get_timezone();
     }
- inline void set_timezone(std::ios_base& ios, timezone_type tz)
+ inline void set_timezone(std::ios_base& ios, timezone tz)
     {
       fmt_masks(ios).set_timezone(tz);
     }

Modified: trunk/boost/chrono/io/time_point_io.hpp
==============================================================================
--- trunk/boost/chrono/io/time_point_io.hpp (original)
+++ trunk/boost/chrono/io/time_point_io.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -34,10 +34,10 @@
       class time_manip: public manip<time_manip<CharT> >
       {
         std::basic_string<CharT> fmt_;
- timezone_type tz_;
+ timezone tz_;
       public:
 
- time_manip(timezone_type tz, std::basic_string<CharT> fmt)
+ time_manip(timezone tz, std::basic_string<CharT> fmt)
         // todo move semantics
         :
           fmt_(fmt), tz_(tz)
@@ -45,7 +45,7 @@
         }
 
         /**
- * Change the timezone_type and time format ios state;
+ * Change the timezone and time format ios state;
          */
         void operator()(std::ios_base &ios) const
         {
@@ -56,10 +56,10 @@
 
       class time_man: public manip<time_man>
       {
- timezone_type tz_;
+ timezone tz_;
       public:
 
- time_man(timezone_type tz)
+ time_man(timezone tz)
         // todo move semantics
         :
           tz_(tz)
@@ -67,7 +67,7 @@
         }
 
         /**
- * Change the timezone_type and time format ios state;
+ * Change the timezone and time format ios state;
          */
         void operator()(std::ios_base &ios) const
         {
@@ -79,19 +79,19 @@
     }
 
     template <class CharT>
- inline detail::time_manip<CharT> time_fmt(timezone_type tz, const CharT* fmt)
+ inline detail::time_manip<CharT> time_fmt(timezone tz, const CharT* fmt)
     {
       return detail::time_manip<CharT>(tz, fmt);
     }
 
     template <class CharT>
- inline detail::time_manip<CharT> time_fmt(timezone_type tz, std::basic_string<CharT> fmt)
+ inline detail::time_manip<CharT> time_fmt(timezone tz, std::basic_string<CharT> fmt)
     {
       // todo move semantics
       return detail::time_manip<CharT>(tz, fmt);
     }
 
- inline detail::time_man time_fmt(timezone_type f)
+ inline detail::time_man time_fmt(timezone f)
     {
       return detail::time_man(f);
     }
@@ -163,7 +163,7 @@
       //! the type of the state to restore
       typedef std::ios_base state_type;
       //! the type of aspect to save
- typedef timezone_type aspect_type;
+ typedef timezone aspect_type;
 
       /**
        * Explicit construction from an i/o stream.
@@ -404,7 +404,7 @@
           pb = fmt.data();
           pe = pb + fmt.size();
 
- timezone_type tz = get_timezone(os);
+ timezone tz = get_timezone(os);
           std::locale loc = os.getloc();
           time_t t = system_clock::to_time_t(tp);
           std::tm tm;
@@ -589,7 +589,7 @@
           pb = fmt.data();
           pe = pb + fmt.size();
 
- timezone_type tz = get_timezone(is);
+ timezone tz = get_timezone(is);
           std::locale loc = is.getloc();
           const std::time_get<CharT>& tg = std::use_facet<std::time_get<CharT> >(loc);
           const std::ctype<CharT>& ct = std::use_facet<std::ctype<CharT> >(loc);

Modified: trunk/boost/chrono/io/timezone.hpp
==============================================================================
--- trunk/boost/chrono/io/timezone.hpp (original)
+++ trunk/boost/chrono/io/timezone.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -9,7 +9,7 @@
 
 #ifndef BOOST_CHRONO_IO_TIMEZONE_HPP
 #define BOOST_CHRONO_IO_TIMEZONE_HPP
-#include <iostream>
+#include <boost/detail/scoped_enum_emulation.hpp>
 
 namespace boost
 {
@@ -18,15 +18,11 @@
     /**
      * Scoped enumeration emulation stating whether the time_point for system_clock I/O is UTC or local.
      */
- struct timezone
- {
- enum type
- {
- utc, local
- };
- };
-
- typedef timezone::type timezone_type;
+ BOOST_SCOPED_ENUM_DECLARE_BEGIN(timezone)
+ {
+ utc, local
+ }
+ BOOST_SCOPED_ENUM_DECLARE_END(timezone)
 
   } // chrono
 } // boost

Modified: trunk/boost/chrono/stopwatches/formatters/base_formatter.hpp
==============================================================================
--- trunk/boost/chrono/stopwatches/formatters/base_formatter.hpp (original)
+++ trunk/boost/chrono/stopwatches/formatters/base_formatter.hpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -45,7 +45,7 @@
       {
         os_ = os;
       }
- void set_duration_style(duration_style::type style)
+ void set_duration_style(duration_style style)
       {
         duration_style_ == style;
       }
@@ -53,7 +53,7 @@
     protected:
       std::size_t precision_;
       ostream_type & os_;
- duration_style::type duration_style_;
+ duration_style duration_style_;
 
     };
 

Modified: trunk/libs/chrono/build/Jamfile.v2
==============================================================================
--- trunk/libs/chrono/build/Jamfile.v2 (original)
+++ trunk/libs/chrono/build/Jamfile.v2 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -1,6 +1,7 @@
 # Boost Chrono Library Build Jamfile
 
 # Copyright Beman Dawes 2002, 2006, 2008
+# Copyright 2009-2012 Vicente J.Botet Escriba.
 
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
@@ -49,6 +50,9 @@
         <toolset>gcc-mingw-4.4.0:<cxxflags>-fdiagnostics-show-option
         <toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
         <toolset>gcc-mingw-4.6.0:<cxxflags>-fdiagnostics-show-option
+ <toolset>gcc-mingw-4.6.3:<cxxflags>-fdiagnostics-show-option
+ <toolset>gcc-mingw-4.7.0:<cxxflags>-fdiagnostics-show-option
+ <toolset>gcc-mingw-4.8.0:<cxxflags>-fdiagnostics-show-option
 # Note: Some of the remarks from the Intel compiler are disabled
 # remark #304: access control not specified ("public" by default)
 # remark #383: value copied to temporary, reference to temporary used

Modified: trunk/libs/chrono/doc/chrono.qbk
==============================================================================
--- trunk/libs/chrono/doc/chrono.qbk (original)
+++ trunk/libs/chrono/doc/chrono.qbk 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -260,9 +260,8 @@
 [def __duration_long [link chrono.reference.io_v1.chrono_io_hpp.manipulators `duration_long`]]
 
 
-[def __duration_style_ns [link chrono.reference.io.duration_style_hpp.duration_style `duration_style`]]
-[def __duration_style [link chrono.reference.io.duration_style_hpp.duration_style `duration_style_type`]]
-[def __duration_style_type [link chrono.reference.io.duration_style_hpp.duration_style `duration_style_type`]]
+[def __duration_style [link chrono.reference.io.duration_style_hpp.duration_style `duration_style`]]
+[def __duration_style_type [link chrono.reference.io.duration_style_hpp.duration_style `duration_style`]]
 [def __prefix [link chrono.reference.io.duration_style_hpp.duration_style `prefix`]]
 [def __symbol [link chrono.reference.io.duration_style_hpp.duration_style `symbol`]]
 
@@ -270,7 +269,7 @@
 [def __name_format [link chrono.reference.io.duration_io_hpp.manipulators.name_format `name_format`]]
 [def __duration_fmt [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt `duration_fmt`]]
 [def __duration_fmt__c1 [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.c1 `duration_fmt`]]
-[def __duration_fmt__op_duration_style [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_duration_style `operator duration_style_type`]]
+[def __duration_fmt__op_duration_style [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_duration_style `operator duration_style`]]
 [def __duration_fmt__get_duration_style [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_duration_style `get_duration_style`]]
 [def __duration_fmt__op_in [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_in `operator >>`]]
 [def __duration_fmt__op_out [link chrono.reference.io.duration_io_hpp.manipulators.duration_fmt.op_out `operator <<`]]
@@ -328,8 +327,7 @@
 
 [/==================]
 
-[def __timezone_ns [link chrono.reference.io.timezone_hpp.timezone `timezone`]]
-[def __timezone [link chrono.reference.io.timezone_hpp.timezone `timezone_type`]]
+[def __timezone [link chrono.reference.io.timezone_hpp.timezone `timezone`]]
 [def __utc [link chrono.reference.io.timezone_hpp.timezone `utc`]]
 [def __local [link chrono.reference.io.timezone_hpp.timezone `local`]]
 
@@ -1358,7 +1356,7 @@
 
 When the format decision is taken at runtime, it could be better to use the parameterized manipulator __duration_fmt as in
 
- duration_style::type style;
+ duration_style style;
   //...
   cout << duration_fmt(style);
 
@@ -4171,25 +4169,17 @@
       namespace chrono {
 
         // typedefs
- struct __duration_style
- {
- enum type {
- __prefix, __symbol
- };
+ enum class __duration_style {
+ __prefix, __symbol
         };
- typedef duration_style::type duration_style_type;
       }
     }
         
 [section:duration_style Scoped enum `duration_style`]
 
- struct duration_style
- {
- enum type {
+ enum class duration_style {
             prefix, symbol
           };
- };
- typedef duration_style::type duration_style_type;
 
 __duration unit names come in two varieties: prefix and symbol.
 
@@ -4215,14 +4205,9 @@
         
 [section:timezone Scoped enum `timezone`]
 
- struct timezone
- {
- enum type {
+ enum class timezone {
             utc, local
           };
- };
- typedef timezone::type timezone_type;
-
 
 [endsect] [/section:timezone Scoped enum `timezone`]
         
@@ -4238,11 +4223,11 @@
       namespace chrono {
 
         // setters and getters
- duration_style::type __get_duration_style(std::ios_base & ios);
- void __set_duration_style(std::ios_base& ios, duration_style::type style);
+ duration_style __get_duration_style(std::ios_base & ios);
+ void __set_duration_style(std::ios_base& ios, duration_style style);
 
- timezone::type __get_timezone(std::ios_base & ios);
- void __set_timezone(std::ios_base& ios, timezone::type tz);
+ timezone __get_timezone(std::ios_base & ios);
+ void __set_timezone(std::ios_base& ios, timezone tz);
         
         // i/o state savers
         struct __duration_style_io_saver;
@@ -4257,15 +4242,15 @@
 
 [section:get_duration_style Non Member Function `get_duration_style(std::ios_base &)`]
 
- duration_style::type get_duration_style(std::ios_base & ios);
+ duration_style get_duration_style(std::ios_base & ios);
         
 __returns The stream's __duration_style attribute associated to `ios`.
         
 [endsect]
 
-[section:set_duration_style Non Member Function `set_duration_style(std::ios_base &,duration_style::type)`]
+[section:set_duration_style Non Member Function `set_duration_style(std::ios_base &,duration_style)`]
 
- void set_duration_style(std::ios_base& ios, duration_style::type style);
+ void set_duration_style(std::ios_base& ios, duration_style style);
         
 __effects Set the stream's __duration_style attribute associated to `ios` so the `style` parameter.
         
@@ -4273,15 +4258,15 @@
 
 [section:get_timezone Non Member Function `get_timezone(std::ios_base&)`]
 
- timezone::type get_timezone(std::ios_base & ios);
+ timezone get_timezone(std::ios_base & ios);
         
 __returns The stream's __timezone attribute associated to `ios`.
         
 [endsect]
 
-[section:set_timezone Non Member Function `set_timezone(std::ios_base&,duration_style::type)`]
+[section:set_timezone Non Member Function `set_timezone(std::ios_base&,duration_style)`]
 
- void set_timezone(std::ios_base& ios, timezone::type tz);
+ void set_timezone(std::ios_base& ios, timezone tz);
         
 __effects Set the stream's __timezone attribute associated to `ios` so the `style` parameter.
         
@@ -5033,16 +5018,16 @@
       virtual bool __duration_units_match_valid_unit(const string_type* k, rt_ratio& rt) const = 0;
       virtual string_type __duration_units_get_pattern() const=0;
       template <typename Rep, typename Period>
- string_type __duration_units_get_unit(duration_style::type style, duration<Rep, Period> const& d) const;
+ string_type __duration_units_get_unit(duration_style style, duration<Rep, Period> const& d) const;
       template <typename Rep, typename Period>
- string_type __duration_units_get_n_d_unit(duration_style::type style, duration<Rep, Period> const& d) const;
+ string_type __duration_units_get_n_d_unit(duration_style style, duration<Rep, Period> const& d) const;
       template <typename Period>
       bool __duration_units_is_named_unit() const;
 
     protected:
       virtual __duration_units_d();
- virtual string_type __duration_units_do_get_n_d_unit(duration_style::type style, rt_ratio rt, intmax_t v) const = 0;
- virtual string_type __duration_units_do_get_unit(duration_style::type style,rt_ratio rt, intmax_t v) const = 0;
+ virtual string_type __duration_units_do_get_n_d_unit(duration_style style, rt_ratio rt, intmax_t v) const = 0;
+ virtual string_type __duration_units_do_get_unit(duration_style style,rt_ratio rt, intmax_t v) const = 0;
       virtual bool __duration_units_do_is_named_unit(rt_ratio rt) const =0;
     };
 
@@ -5135,20 +5120,20 @@
 __returns the pattern to be used by default.
 
 [endsect]
-[section:get_unit Template Member Function `get_unit(duration_style::type,duration<Rep,Period> const&)`]
+[section:get_unit Template Member Function `get_unit(duration_style,duration<Rep,Period> const&)`]
 
       template <typename Rep, typename Period>
- string_type get_unit(duration_style::type style, duration<Rep, Period> const& d) const;
+ string_type get_unit(duration_style style, duration<Rep, Period> const& d) const;
 
 
 __returns `get_unit(style, d.count(), rt_ratio(Period()))`, the unit associated to this duration.
 
 [endsect]
         
-[section:get_n_d_unit Template Member Function `get_n_d_unit(duration_style::type,duration<Rep,Period> const&)`]
+[section:get_n_d_unit Template Member Function `get_n_d_unit(duration_style,duration<Rep,Period> const&)`]
 
       template <typename Rep, typename Period>
- string_type get_n_d_unit(duration_style::type style, duration<Rep, Period> const& d) const;
+ string_type get_n_d_unit(duration_style style, duration<Rep, Period> const& d) const;
 
 __returns get_n_d_unit(style, d.count(), rt_ratio(Period())), i.e. the [N/D] suffix unit associated to this duration.
 
@@ -5163,17 +5148,17 @@
 
 [endsect]
         
-[section:do_get_n_d_unit Protected Member Function `do_get_n_d_unit(duration_style::type,rt_ratio,intmax_t)`]
+[section:do_get_n_d_unit Protected Member Function `do_get_n_d_unit(duration_style,rt_ratio,intmax_t)`]
 
- virtual string_type do_get_n_d_unit(duration_style::type style, rt_ratio rt, intmax_t v) const = 0;
+ virtual string_type do_get_n_d_unit(duration_style style, rt_ratio rt, intmax_t v) const = 0;
 
 __returns the [N/D] suffix unit associated to this duration.
 
 [endsect]
         
-[section:do_get_unit Protected Member Function `do_get_unit(duration_style::type,rt_ratio,intmax_t)`]
+[section:do_get_unit Protected Member Function `do_get_unit(duration_style,rt_ratio,intmax_t)`]
 
- virtual string_type do_get_unit(duration_style::type style,rt_ratio rt, intmax_t v) const = 0;
+ virtual string_type do_get_unit(duration_style style,rt_ratio rt, intmax_t v) const = 0;
 
 __returns the unit associated to this duration.
       
@@ -5213,48 +5198,48 @@
       string_type get_pattern() const;
     protected:
       bool do_is_named_unit(rt_ratio rt) const;
- string_type do_get_n_d_unit(duration_style::type style, rt_ratio, intmax_t v) const;
- string_type do_get_unit(duration_style::type style, rt_ratio rt, intmax_t v) const;
+ string_type do_get_n_d_unit(duration_style style, rt_ratio, intmax_t v) const;
+ string_type do_get_unit(duration_style style, rt_ratio rt, intmax_t v) const;
       
       virtual std::size_t do_get_plural_forms() const;
       virtual std::size_t do_get_plural_form(int_least64_t value) const;
 
- virtual string_type do_get_unit(duration_style_type style, ratio<1> u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, ratio<60> u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, ratio<3600> u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, atto u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, femto u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, pico u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, nano u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, micro u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, milli u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, centi u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, deci u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, deca u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, hecto u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, kilo u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, mega u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, giga u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, tera u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, peta u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, exa u, std::size_t pf) const;
-
- virtual string_type do_get_ratio_prefix(duration_style_type style, atto u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, femto u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, pico u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, nano u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, micro u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, milli u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, centi u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, deci u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, deca u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, hecto u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, kilo u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, mega u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, giga u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, tera u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, peta u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, exa u) const;
+ virtual string_type do_get_unit(duration_style style, ratio<1> u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, ratio<60> u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, ratio<3600> u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, atto u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, femto u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, pico u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, nano u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, micro u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, milli u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, centi u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, deci u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, deca u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, hecto u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, kilo u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, mega u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, giga u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, tera u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, peta u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, exa u, std::size_t pf) const;
+
+ virtual string_type do_get_ratio_prefix(duration_style style, atto u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, femto u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, pico u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, nano u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, micro u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, milli u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, centi u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, deci u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, deca u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, hecto u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, kilo u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, mega u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, giga u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, tera u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, peta u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, exa u) const;
     };
 
 This class is used to define the strings for the default English.
@@ -5367,17 +5352,17 @@
 
 [endsect]
         
-[section:do_get_n_d_unit Protected Member Function `do_get_n_d_unit(duration_style::type,rt_ratio,intmax_t)`]
+[section:do_get_n_d_unit Protected Member Function `do_get_n_d_unit(duration_style,rt_ratio,intmax_t)`]
 
- virtual string_type do_get_n_d_unit(duration_style::type style, rt_ratio rt, intmax_t v) const;
+ virtual string_type do_get_n_d_unit(duration_style style, rt_ratio rt, intmax_t v) const;
 
 __returns the [N/D] suffix unit associated to this duration.
 
 [endsect]
         
-[section:do_get_unit Protected Member Function `do_get_unit(duration_style::type,rt_ratio,intmax_t)`]
+[section:do_get_unit Protected Member Function `do_get_unit(duration_style,rt_ratio,intmax_t)`]
 
- virtual string_type do_get_unit(duration_style::type style,rt_ratio rt, intmax_t v) const;
+ virtual string_type do_get_unit(duration_style style,rt_ratio rt, intmax_t v) const;
 
 __returns the unit associated to this duration.
       
@@ -5416,9 +5401,9 @@
 
 [endsect]
 
-[section:do_get_unit_seconds Protected Member Function `do_get_unit(duration_style_type,ratio<1>,std::size_t)`]
+[section:do_get_unit_seconds Protected Member Function `do_get_unit(duration_style,ratio<1>,std::size_t)`]
 
- virtual string_type do_get_unit(duration_style_type style, ratio<1> u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, ratio<1> u, std::size_t pf) const;
 
 __params
 
@@ -5430,9 +5415,9 @@
 
 [endsect]
 
-[section:do_get_unit_minutes Protected Member Function `do_get_unit(duration_style_type style,ratio<60>,std::size_t)`]
+[section:do_get_unit_minutes Protected Member Function `do_get_unit(duration_style style,ratio<60>,std::size_t)`]
 
- virtual string_type do_get_unit(duration_style_type style, ratio<60> u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, ratio<60> u, std::size_t pf) const;
 
 __params
 
@@ -5444,9 +5429,9 @@
 
 [endsect]
 
-[section:do_get_unit_hours Protected Member Function `do_get_unit(duration_style_type,ratio<3600>,std::size_t)`]
+[section:do_get_unit_hours Protected Member Function `do_get_unit(duration_style,ratio<3600>,std::size_t)`]
 
- virtual string_type do_get_unit(duration_style_type style, ratio<3600> u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, ratio<3600> u, std::size_t pf) const;
 
 __params
 
@@ -5458,24 +5443,24 @@
 
 [endsect]
 
-[section:do_get_unit_xxx Protected Member Function `do_get_unit(duration_style_type,Period,std::size_t)`]
+[section:do_get_unit_xxx Protected Member Function `do_get_unit(duration_style,Period,std::size_t)`]
 
- virtual string_type do_get_unit(duration_style_type style, atto u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, femto u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, pico u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, nano u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, micro u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, milli u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, centi u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, deci u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, deca u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, hecto u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, kilo u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, mega u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, giga u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, tera u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, peta u, std::size_t pf) const;
- virtual string_type do_get_unit(duration_style_type style, exa u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, atto u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, femto u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, pico u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, nano u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, micro u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, milli u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, centi u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, deci u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, deca u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, hecto u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, kilo u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, mega u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, giga u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, tera u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, peta u, std::size_t pf) const;
+ virtual string_type do_get_unit(duration_style style, exa u, std::size_t pf) const;
       
 __params
 
@@ -5487,24 +5472,24 @@
 
 [endsect]
 
-[section:do_get_ratio_prefix_xxx Protected Member Function `do_get_ratio_prefix(duration_style_type, Period)`]
+[section:do_get_ratio_prefix_xxx Protected Member Function `do_get_ratio_prefix(duration_style, Period)`]
 
- virtual string_type do_get_ratio_prefix(duration_style_type style, atto u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, femto u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, pico u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, nano u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, micro u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, milli u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, centi u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, deci u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, deca u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, hecto u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, kilo u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, mega u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, giga u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, tera u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, peta u) const;
- virtual string_type do_get_ratio_prefix(duration_style_type style, exa u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, atto u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, femto u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, pico u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, nano u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, micro u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, milli u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, centi u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, deci u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, deca u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, hecto u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, kilo u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, mega u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, giga u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, tera u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, peta u) const;
+ virtual string_type do_get_ratio_prefix(duration_style style, exa u) const;
 
 __params
 
@@ -5584,9 +5569,9 @@
         __duration_fmt__op_in(std::basic_istream<CharT, Traits>& is, duration_fmt d);
 
 
-[section:c1 Constructor `duration_fmt(duration_style_type)`]
+[section:c1 Constructor `duration_fmt(duration_style)`]
 
- explicit duration_fmt(duration_style_type f) noexcept;
+ explicit duration_fmt(duration_style f) noexcept;
 
 __effects Constructs a __duration_fmt by storing `f`.
 
@@ -5596,7 +5581,7 @@
 [section:op_duration_style Member Function `operator duration_style()`]
 
   explicit operator duration_style() const noexcept;
- duration_style_type get_duration_style() const noexcept;
+ duration_style get_duration_style() const noexcept;
 
 __returns: The stored __duration_fmt `f`.
 
@@ -6320,11 +6305,11 @@
 
         // manipulators
 
- unspecified __time_fmt1(timezone::type tz);
+ unspecified __time_fmt1(timezone tz);
         template<class CharT>
- unspecified __time_fmt2(timezone::type tz, basic_string<CharT> f);
+ unspecified __time_fmt2(timezone tz, basic_string<CharT> f);
         template<class CharT>
- unspecified __time_fmt2(timezone::type tz, const CharT* f);
+ unspecified __time_fmt2(timezone tz, const CharT* f);
 
         // i/o state savers
 
@@ -6332,7 +6317,7 @@
         struct __timezone_io_saver
         {
           typedef std::basic_ios<CharT, Traits> state_type;
- typedef timezone::type aspect_type;
+ typedef timezone aspect_type;
 
           explicit __timezone_io_saver__c1(state_type &s);
           __timezone_io_saver__c2(state_type &s, aspect_type new_value);
@@ -7581,7 +7566,7 @@
 [/==================================]
 [section:history Appendix: History]
 [/==================================]
-[section [*Version 2.0.0, January 1, 2012] ]
+[section [*Version 2.0.0, July 1, 2012] ]
 
 [*New Features:]
 

Modified: trunk/libs/chrono/example/french.cpp
==============================================================================
--- trunk/libs/chrono/example/french.cpp (original)
+++ trunk/libs/chrono/example/french.cpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -40,7 +40,7 @@
         return (value == -1 || value == 0 || value == 1) ? 0 : 1;
       }
 
- std::basic_string<CharT> do_get_unit(duration_style_type style, ratio<1> , std::size_t pf) const
+ std::basic_string<CharT> do_get_unit(duration_style style, ratio<1> , std::size_t pf) const
       {
         static const CharT t[] =
         { 's' };
@@ -59,7 +59,7 @@
         throw "exception";
       }
 
- std::basic_string<CharT> do_get_unit(duration_style_type style, ratio<60> , std::size_t pf) const
+ std::basic_string<CharT> do_get_unit(duration_style style, ratio<60> , std::size_t pf) const
       {
         static const CharT t[] =
         { 'm', 'i', 'n' };
@@ -79,7 +79,7 @@
         throw "exception";
       }
 
- std::basic_string<CharT> do_get_unit(duration_style_type style, ratio<3600> , std::size_t pf) const
+ std::basic_string<CharT> do_get_unit(duration_style style, ratio<3600> , std::size_t pf) const
       {
         static const CharT t[] =
         { 'h' };

Modified: trunk/libs/chrono/test/io/duration_output.cpp
==============================================================================
--- trunk/libs/chrono/test/io/duration_output.cpp (original)
+++ trunk/libs/chrono/test/io/duration_output.cpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -31,7 +31,7 @@
 #if BOOST_CHRONO_VERSION==2
 
 template<typename D>
-void test_good(const char* str, D d, boost::chrono::duration_style::type style)
+void test_good(const char* str, D d, boost::chrono::duration_style style)
 {
   std::ostringstream out;
 
@@ -41,7 +41,7 @@
 }
 
 template<typename D>
-void test_state_saver(const char* str, const char* str2, D d, boost::chrono::duration_style::type style)
+void test_state_saver(const char* str, const char* str2, D d, boost::chrono::duration_style style)
 {
   std::ostringstream out;
   {

Modified: trunk/libs/chrono/test/io/time_point_output.cpp
==============================================================================
--- trunk/libs/chrono/test/io/time_point_output.cpp (original)
+++ trunk/libs/chrono/test/io/time_point_output.cpp 2012-05-12 13:27:59 EDT (Sat, 12 May 2012)
@@ -35,7 +35,7 @@
 
 #if BOOST_CHRONO_VERSION==2
 template<typename Clock, typename D>
-void test_good(const char* str, D d, boost::chrono::duration_style::type style)
+void test_good(const char* str, D d, boost::chrono::duration_style style)
 {
   std::ostringstream out;
   boost::chrono::time_point<Clock,D> tp(d);


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