Opened 5 years ago

Closed 5 years ago

#7375 closed Patches (fixed)

seed_rng.hpp gives warning on gcc 4.1.2

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


I am getting a warning in default generator_iterator ctor.

template <class Generator>
class generator_iterator

: public iterator_facade<


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



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



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 (1)

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

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by Leonid Gershanovich <gleonid@…>

Attachment: seed_rng.hpp.1_46_1.patch added

patch for boost/uuid/seed_rng.hpp

comment:1 Changed 5 years ago by Andrey Semashev

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

comment:2 Changed 5 years ago by Andy Tompkins

Resolution: fixed
Status: newclosed

checked in release - changeset #80846

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Andy Tompkins.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.