Boost C++ Libraries: Ticket #7375: seed_rng.hpp gives warning on gcc 4.1.2 https://svn.boost.org/trac10/ticket/7375 <p> I am getting a warning in default generator_iterator ctor. </p> <p> template &lt;class Generator&gt;<br /> class generator_iterator<br /> </p> <blockquote> <p> : public iterator_facade&lt;<br /> </p> <blockquote> <p> generator_iterator&lt;Generator&gt;<br /> </p> </blockquote> <p> , typename Generator::result_type<br /> , single_pass_traversal_tag<br /> , typename Generator::result_type const&amp;<br /> </p> <blockquote class="citation"> <p> <br /> </p> </blockquote> </blockquote> <p> {<br /> </p> <blockquote> <p> public:<br /> </p> <blockquote> <p> <strong>generator_iterator()</strong> : m_g(NULL) {}<br /> generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {}<br /> </p> </blockquote> </blockquote> <p> <br /> </p> <blockquote> <p> ...<br /> </p> </blockquote> <p> <br /> </p> <blockquote> <p> private:<br /> </p> <blockquote> <p> Generator* m_g;<br /> typename Generator::result_type <strong>m_value</strong>;<br /> </p> </blockquote> </blockquote> <p> }; </p> <p> Depending on resulting type of "typename Generator::result_type" it is possible that m_value member remains uninitialized when object created via default ctor. </p> <p> Please consider attached patch. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7375 Trac 1.4.3 Leonid Gershanovich <gleonid@…> Thu, 13 Sep 2012 19:54:16 GMT attachment set https://svn.boost.org/trac10/ticket/7375 https://svn.boost.org/trac10/ticket/7375 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">seed_rng.hpp.1_46_1.patch</span> </li> </ul> <p> patch for boost/uuid/seed_rng.hpp </p> Ticket Andrey Semashev Fri, 28 Sep 2012 07:41:55 GMT <link>https://svn.boost.org/trac10/ticket/7375#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7375#comment:1</guid> <description> <p> I'm havind the same warning with GCC 4.7. What's the status of this ticket? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andy Tompkins</dc:creator> <pubDate>Thu, 04 Oct 2012 17:12:31 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7375#comment:2 https://svn.boost.org/trac10/ticket/7375#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> checked in release - changeset <a class="missing ticket">#80846</a> </p> Ticket