Subject: [Boost-bugs] [Boost C++ Libraries] #7375: seed_rng.hpp gives warning on gcc 4.1.2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-13 19:53:25
#7375: seed_rng.hpp gives warning on gcc 4.1.2
-----------------------------------------------------+----------------------
Reporter: Leonid Gershanovich <gleonid@â¦> | Owner: atompkins
Type: Patches | Status: new
Milestone: To Be Determined | Component: uuid
Version: Boost 1.51.0 | Severity: Problem
Keywords: |
-----------------------------------------------------+----------------------
I am getting a warning in default generator_iterator ctor.
template <class Generator>[[BR]]
class generator_iterator[[BR]]
: public iterator_facade<[[BR]]
generator_iterator<Generator>[[BR]]
, typename Generator::result_type[[BR]]
, single_pass_traversal_tag[[BR]]
, typename Generator::result_type const&[[BR]]
>[[BR]]
{[[BR]]
public:[[BR]]
'''generator_iterator()''' : m_g(NULL) {}[[BR]]
generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {}[[BR]]
[[BR]]
...[[BR]]
[[BR]]
private:[[BR]]
Generator* m_g;[[BR]]
typename Generator::result_type '''m_value''';[[BR]]
};
Depending on resulting type of "typename Generator::result_type" it is
possible that m_value member remains uninitialized when object created via
default ctor.
Please consider attached patch.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7375> 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:10 UTC