Re: [Boost-bugs] [Boost C++ Libraries] #2428: [random] missing member initialization of generator_iterator ctor

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2428: [random] missing member initialization of generator_iterator ctor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-12-09 09:15:44


#2428: [random] missing member initialization of generator_iterator ctor
-----------------------------------------------------+----------------------
  Reporter: Johannes Brunen <JBrunen_at_[hidden]> | Owner: no-maintainer
      Type: Bugs | Status: new
 Milestone: Boost 1.37.0 | Component: random
   Version: Boost 1.36.0 | Severity: Problem
Resolution: | Keywords: generator_iterator default ctor
-----------------------------------------------------+----------------------

Comment(by anonymous):

 In case of the mersenne_twister generator the Generator::result_type is
 UIntType. Probably more correct would be initialization with
 Generator::result_type(), i.e.

 generator_iterator() : m_g(0), m_value(Generator::result_type()) {}

 Default construction of integral types are guaranteed to be 0.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2428#comment:2>
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:49:59 UTC