Modify

Ticket #7375 (closed Patches: fixed)

Opened 19 months ago

Last modified 19 months ago

seed_rng.hpp gives warning on gcc 4.1.2

Reported by: Leonid Gershanovich <gleonid@…> Owned by: atompkins
Milestone: To Be Determined Component: uuid
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

I am getting a warning in default generator_iterator ctor.

template <class Generator>
class generator_iterator

: public iterator_facade<

generator_iterator<Generator>

, typename Generator::result_type
, single_pass_traversal_tag
, typename Generator::result_type const&


{

public:

generator_iterator() : m_g(NULL) {}
generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {}


...


private:

Generator* m_g;
typename Generator::result_type m_value;

};

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.

Attachments

seed_rng.hpp.1_46_1.patch Download (474 bytes) - added by Leonid Gershanovich <gleonid@…> 19 months ago.
patch for boost/uuid/seed_rng.hpp

Change History

Changed 19 months ago by Leonid Gershanovich <gleonid@…>

patch for boost/uuid/seed_rng.hpp

comment:1 Changed 19 months ago by andysem

I'm havind the same warning with GCC 4.7. What's the status of this ticket?

comment:2 Changed 19 months ago by atompkins

  • Status changed from new to closed
  • Resolution set to fixed

checked in release - changeset #80846

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.