Subject: [Boost-bugs] [Boost C++ Libraries] #5322: Explicit default constructed chrono::durations are uninitialized
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-16 19:04:15
#5322: Explicit default constructed chrono::durations are uninitialized
-------------------------------------------------+--------------------------
Reporter: jofaber | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
Version: Boost Development Trunk | Severity: Problem
Keywords: chrono duration default constructor |
-------------------------------------------------+--------------------------
For `boost::chrono::durations` the default constructor is supposed to work
like this:
{{{
#!c++
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5322> 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