Created on 2011-05-13.00:00:00 last changed 146 months ago
Proposed resolution:
This wording is relative to the FDIS.
Alter the class template definition in [time.point] as follows:
template <class Clock, class Duration = typename Clock::duration> class time_point { […] public: // 20.11.6.1, construct: constexpr time_point(); // has value epoch constexpr explicit time_point(const duration& d); // same as time_point() + d template <class Duration2> constexpr time_point(const time_point<clock, Duration2>& t); // 20.11.6.2, observer: constexpr duration time_since_epoch() const; […] };
Alter the declarations in [time.point.cons]:
constexpr time_point();-1- Effects: Constructs an object of type time_point, initializing d_ with duration::zero(). Such a time_point object represents the epoch.
constexpr explicit time_point(const duration& d);-2- Effects: Constructs an object of type time_point, initializing d_ with d. Such a time_point object represents the epoch + d.
template <class Duration2> constexpr time_point(const time_point<clock, Duration2>& t);-3- Remarks: This constructor shall not participate in overload resolution unless Duration2 is implicitly convertible to duration.
-4- Effects: Constructs an object of type time_point, initializing d_ with t.time_since_epoch().
Alter the declaration in [time.point.observer]:
constexpr duration time_since_epoch() const;-1- Returns: d_.
[ 2012, Portland ]
Resolved by adopting paper n3469.
In [time.point], time_point::min() and time_point::max() are listed as constexpr. However, time_point has no constexpr constructors, so is not a literal type, and so these functions cannot be constexpr without adding a constexpr constructor for implementation purposes.
Proposed resolution: Add constexpr to the constructors of time_point. The effects of the constructor template basically imply that the member function time_since_epoch() is intended to be constexpr as well.History | |||
---|---|---|---|
Date | User | Action | Args |
2012-11-07 13:15:52 | admin | set | messages: + msg6274 |
2012-11-07 13:15:52 | admin | set | status: open -> resolved |
2011-08-16 10:45:53 | admin | set | status: new -> open |
2011-05-17 22:23:06 | admin | set | messages: + msg5776 |
2011-05-13 00:00:00 | admin | create |