Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74806 - in trunk: boost/chrono boost/chrono/io libs/chrono/doc
From: vicente.botet_at_[hidden]
Date: 2011-10-08 10:47:40


Author: viboes
Date: 2011-10-08 10:47:39 EDT (Sat, 08 Oct 2011)
New Revision: 74806
URL: http://svn.boost.org/trac/boost/changeset/74806

Log:
Chrono: Updated include.hpp and doc
Text files modified:
   trunk/boost/chrono/include.hpp | 4 +
   trunk/boost/chrono/io/time_point_io.hpp | 1
   trunk/libs/chrono/doc/chrono.qbk | 109 +++++++++++++++++++++++++++------------
   3 files changed, 79 insertions(+), 35 deletions(-)

Modified: trunk/boost/chrono/include.hpp
==============================================================================
--- trunk/boost/chrono/include.hpp (original)
+++ trunk/boost/chrono/include.hpp 2011-10-08 10:47:39 EDT (Sat, 08 Oct 2011)
@@ -14,8 +14,10 @@
 
 #include <boost/chrono/chrono.hpp>
 #include <boost/chrono/chrono_io.hpp>
-#include <boost/chrono/typeof/boost/chrono/chrono.hpp>
 #include <boost/chrono/process_cpu_clocks.hpp>
 #include <boost/chrono/thread_clock.hpp>
+#include <boost/chrono/ceil.hpp>
+#include <boost/chrono/floor.hpp>
+#include <boost/chrono/round.hpp>
 
 #endif // BOOST_CHRONO_INCLUDE_HPP

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 2011-10-08 10:47:39 EDT (Sat, 08 Oct 2011)
@@ -18,6 +18,7 @@
 #include <boost/chrono/detail/scan_keyword.hpp>
 #include <boost/chrono/round.hpp>
 #include <boost/chrono/io/translate.hpp>
+#include <boost/chrono/clock_string.hpp>
 
 namespace boost
 {

Modified: trunk/libs/chrono/doc/chrono.qbk
==============================================================================
--- trunk/libs/chrono/doc/chrono.qbk (original)
+++ trunk/libs/chrono/doc/chrono.qbk 2011-10-08 10:47:39 EDT (Sat, 08 Oct 2011)
@@ -102,7 +102,7 @@
 
 [template chrono_conf[link_text] [link chrono.reference.cpp0x.chrono_chrono_hpp.conf [link_text]]]
 
-[def __BOOST_CHRONO_HEADER_ONLY [link chrono.reference.cpp0x.chrono_hpp.conf.header_only `BOOST_CHRONO_HEADER_ONLY`]]
+[def __BOOST_CHRONO_HEADER_ONLY [link chrono.reference.cpp0x.chrono_chrono_hpp.conf.header_only `BOOST_CHRONO_HEADER_ONLY`]]
 [def __BOOST_SYSTEM_INLINED `BOOST_SYSTEM_INLINED`]
 
 [def __BOOST_CHRONO_USES_STATIC_ASSERT [chrono_conf `BOOST_CHRONO_USES_STATIC_ASSERT`]]
@@ -2490,13 +2490,40 @@
 
 The documentation doesn't use these macros.
 
-[section:cpp0x Included on the C++11 Recommendation]
+[/=============================================]
+[section:chrono_include_hpp Header `<boost/chrono/include.hpp>`]
+[/=============================================]
+
+Include all the chrono header files.
+
+ #include <boost/chrono/chrono.hpp>
+ #include <boost/chrono/chrono_io.hpp>
+ #include <boost/chrono/process_cpu_clocks.hpp>
+ #include <boost/chrono/thread_clocks.hpp>
+ #include <boost/chrono/ceil.hpp>
+ #include <boost/chrono/floor.hpp>
+ #include <boost/chrono/round.hpp>
+
+[endsect]
 
+[section:cpp0x Included on the C++11 Recommendation]
 
 [/=============================================]
 [section:chrono_hpp Header `<boost/chrono.hpp>`]
 [/=============================================]
 
+Include only the standard files.
+
+ #include <boost/chrono/chrono.hpp>
+
+[endsect]
+
+[/=============================================]
+[section:chrono_chrono_hpp Header `<boost/chrono/chrono.hpp>`]
+[/=============================================]
+
+Include only the standard files.
+
     #include <boost/chrono/duration.hpp>
     #include <boost/chrono/time_point.hpp>
     #include <boost/chrono/system_clocks.hpp>
@@ -2541,12 +2568,24 @@
 
 [endsect]
 
+[section:no_hybrid Don't provide Hybrid Error Handling]
+
+When `BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING` is defined the lib don't provides the hybrid error handling prototypes:
+
+ Clock::time_point Clock::now(system::error_code&ec=boost::thows());
+
+This allow to be closer to the standard and to avoid the Boost.System dependency, making possible to have Boost.Chrono as a header-only library.
+
+[endsect] [/section:header_only How to Build Boost.Chrono as a Header Only Library?]
+
 [section:header_only How to Build Boost.Chrono as a Header Only Library?]
 
 When `BOOST_CHRONO_HEADER_ONLY` is defined the lib is header-only.
 
 If in addition `BOOST_USE_WINDOWS_H` is defined `<windows.h>` is included, otherwise files in `boost/detail/win` are used to reduce the impact of including `<windows.h>`.
 
+However, you will either need to define `BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING` or link with Boost.System.
+
 [endsect] [/section:header_only How to Build Boost.Chrono as a Header Only Library?]
 
 [endsect] [/section:conf Configuration Macros]
@@ -3843,6 +3882,38 @@
 
 [endsect]
 
+[/==================================================================]
+[section:clock_strings_hpp Header `<boost/chrono/clock_strings.hpp>`]
+[/==================================================================]
+
+ namespace boost {
+ namespace chrono {
+
+ template <class __Clock, class CharT>
+ struct clock_string;
+
+ }
+ }
+
+[section:clock_string Template Class `clock_string<>`]
+
+ template <class __Clock, class CharT>
+ struct clock_string;
+
+This template must be specialized for specific clocks. The specialization must define the following functions
+
+ static std::basic_string<CharT> name();
+ static std::basic_string<CharT> since();
+
+`clock_string<>::name()` return the clock name, which usually corresponds to the class name.
+
+`clock_string<>::since()` return the textual format of the clock epoch.
+
+
+[endsect]
+
+[endsect] [/section:clock_strings_hpp Header `<boost/chrono/clock_strings.hpp>`]
+
 [/=============================================]
 [section:chrono_typeof_hpp Header `<boost/chrono/typeof/boost/chrono/chrono.hpp>`]
 [/=============================================]
@@ -4657,37 +4728,6 @@
 [endsect] [/section:time_point_io_hpp Header `<boost/chrono/io/time_point_io.hpp>`]
 
 
-[/==================================================================]
-[section:clock_strings_hpp Header `<boost/chrono/io/clock_strings.hpp>`]
-[/==================================================================]
-
- namespace boost {
- namespace chrono {
-
- template <class __Clock, class CharT>
- struct clock_string;
-
- }
- }
-
-[section:clock_string Template Class `clock_string<>`]
-
- template <class __Clock, class CharT>
- struct clock_string;
-
-This template must be specialized for specific clocks. The specialization must define the following functions
-
- static std::basic_string<CharT> name();
- static std::basic_string<CharT> since();
-
-`clock_string<>::name()` return the clock name, which usually corresponds to the class name.
-
-`clock_string<>::since()` return the textual format of the clock epoch.
-
-
-[endsect]
-
-[endsect] [/section:clock_strings_hpp Header `<boost/chrono/io/clock_strings.hpp>`]
 
 
 [/==================================================================]
@@ -5770,7 +5810,8 @@
 
 [*New Features:]
 
-* [@http://svn.boost.org/trac/boost/ticket/5979 #5979] Added chrono rounding utilities as defined By Howard Hinnant [@http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html here].
+* [@http://svn.boost.org/trac/boost/ticket/5979 #5979] Added chrono rounding utilities as defined By Howard Hinnant [@http://home.roadrunner.com/~hinnant/duration_io/chrono_util.html here].
+* [@http://svn.boost.org/trac/boost/ticket/5978 #5978] Add BOOST_CHRONO_HAS_PROCESS_CLOCKS to know if process clocks are available.
 * [@http://svn.boost.org/trac/boost/ticket/5978 #5978] Add BOOST_CHRONO_HAS_PROCESS_CLOCKS to know if process clocks are available.
 * [@http://svn.boost.org/trac/boost/ticket/5906 #5906] Take in account the constexpr as defined in the standard.
 * [@http://svn.boost.org/trac/boost/ticket/5907 #5907] Take in account noexcept for compilers supporting it.


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