Boost C++ Libraries: Ticket #13484: exists doesn't clear no_such_file_or_directory type of error codes https://svn.boost.org/trac10/ticket/13484 <p> Windows 10, MSVC 19.13.26128. </p> <p> exists() fails when it successfully determines that a file doesn't exist (i.e. it sets the error code to ERROR_FILE_NOT_FOUND or throws in the throwing version). According to the reference and the tutorial example, that should not happen. </p> <p> Code example: </p> <pre class="wiki"> boost::filesystem::path p("c:\\filethatdoesntexist"); boost::system::error_code ec; bool doesExist = boost::filesystem::exists(p, ec); if (ec == boost::system::errc::no_such_file_or_directory) { std::cout &lt;&lt; "shouldn't happen!\n"; } </pre><p> Note that for existing files, exists() works as expected. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13484 Trac 1.4.3