Boost C++ Libraries: Ticket #12640: is_empty and remove_all may throw even when called with error_code& argument. https://svn.boost.org/trac10/ticket/12640 <p> Some of the code that underpins is_empty and remove_all constructs directory_iterator objects without passing through an error_code&amp; argument. I have spotted this in both is_empty_directory and remove_all_aux . The latter also uses operator++ on the iterator rather than calling increment, I haven't checked whether this is more widespread. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12640 Trac 1.4.3 ivan.mazovec@… Sat, 03 Dec 2016 06:38:58 GMT <link>https://svn.boost.org/trac10/ticket/12640#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12640#comment:1</guid> <description> <p> i have same problem. </p> <p> code: </p> <div class="wiki-code"><div class="code"><pre><span class="n">boost</span><span class="o">::</span><span class="n">system</span><span class="o">::</span><span class="n">error_code</span> <span class="n">e</span><span class="p">;</span> <span class="n">boost</span><span class="o">::</span><span class="n">filesystem</span><span class="o">::</span><span class="n">is_empty</span><span class="p">(</span><span class="s">&quot;/lost+found&quot;</span><span class="p">,</span> <span class="n">e</span><span class="p">);</span> </pre></div></div><p> output: </p> <p> unknown location(0): fatal error: in "general_case": boost::filesystem::filesystem_error: boost::filesystem::directory_iterator::construct: Permission denied: "/lost+found" </p> </description> <category>Ticket</category> </item> </channel> </rss>