Subject: [Boost-bugs] [Boost C++ Libraries] #5328: Addition of increment and decrement operators to chrono::time_point
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-17 20:04:55
#5328: Addition of increment and decrement operators to chrono::time_point
---------------------------------------------------+------------------------
Reporter: jofaber | Owner: viboes
Type: Feature Requests | Status: new
Milestone: Boost 1.47.0 | Component: chrono
Version: Boost Development Trunk | Severity: Problem
Keywords: increment decrement chrono time_point |
---------------------------------------------------+------------------------
From the viewpoint of generic interoperability fundamental operations are
needed for possible generic recipient libraries of boost::chrono, that
impose some fundamental requirements on their parameter types. E.g.
Intervals and interval containers of Boost.Icl rely on the existence of an
increment and decrement operator for intervals an interval containers of
chrono::time_points.
`time_point& operator++()` is an incrementation of one least steppable
unit for integral `rep` types and a unit step for floating point `rep`
types. It repesents one tick of the clock and is equivalent with
incrementing the time_point's `duration`. So it can be efficiently
implemented by incrementation of the underlying `rep_` member. This ticket
requests the addition of the four common in/decrementation operations:
{{{
#!c++
time_point& operator++() ;
time_point operator++(int);
time_point& operator--() ;
time_point operator--(int);
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5328> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC