Boost C++ Libraries: Ticket #6557: directory_iterator_increment fails to throw exception https://svn.boost.org/trac10/ticket/6557 <p> When trying to construct a directory_iterator from a location that doesn't exist anymore, no exception is thrown. </p> <p> This code in directory_iterator_increment fails: </p> <p> if (temp_ec) </p> <blockquote> <p> { </p> <blockquote> <p> it.m_imp.reset(); if (ec == 0) </p> <blockquote> <p> BOOST_FILESYSTEM_THROW( </p> <blockquote> <p> filesystem_error("boost::filesystem::directory_iterator::operator++", </p> <blockquote> <p> it.m_imp-&gt;dir_entry.path().parent_path(), error_code(BOOST_ERRNO, system_category()))); </p> </blockquote> </blockquote> </blockquote> <p> ec-&gt;assign(BOOST_ERRNO, system_category()); return; </p> </blockquote> <p> } </p> </blockquote> <p> it.m_imp is first reset and then used while trying to throw an exception. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6557 Trac 1.4.3 anonymous Tue, 27 Mar 2012 07:05:11 GMT <link>https://svn.boost.org/trac10/ticket/6557#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6557#comment:1</guid> <description> <p> Fixed in <a class="ext-link" href="http://svn.boost.org/svn/boost/trunk/libs/filesystem/src/operations.cpp"><span class="icon">​</span>http://svn.boost.org/svn/boost/trunk/libs/filesystem/src/operations.cpp</a> (an shipped in boost 1.49) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Sun, 27 Nov 2016 13:20:47 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6557#comment:2 https://svn.boost.org/trac10/ticket/6557#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> Ticket