#5322 closed Bugs (fixed)
Explicit default constructed chrono::durations are uninitialized
Reported by: | Joachim Faulhaber | Owned by: | viboes |
---|---|---|---|
Milestone: | Boost 1.47.0 | Component: | chrono |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | chrono duration default constructor | Cc: |
Description
For boost::chrono::durations
the default constructor is supposed to work like this:
typedef std::chrono::duration<int> D; D d1; // d1.count() uninitialized D d2 = D(); // d2.count() zero-initialized
In the current implementation, durations d1
and d2
are uninitialized. Yet d2
should be initialized by zero.
Change History (3)
comment:1 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 11 years ago
Milestone: | To Be Determined → Boost 1.47.0 |
---|
Note:
See TracTickets
for help on using tickets.
Hi,
I don't remember when I committed a fix, but the code now is
Please reopen the ticket if you have any issues yet.