Boost C++ Libraries: Ticket #5149: Incorrect behavior of basic_path.remove_filename() function https://svn.boost.org/trac10/ticket/5149 <p> According to the documentation of basic_path.remove_filename(), the result should not contain any trailing slashes if the result is not the root directory. However, this is not what I am observing. </p> <p> Here is an example of what I have observed. I invoked current_path&lt;path&gt;() and displayed a partial list of the properties of the result which are as follows: </p> <blockquote> <p> string = 'C:/Devel/projects/compiler_tests/test_path' </p> </blockquote> <blockquote> <p> file_string = 'C:\Devel\projects\compiler_tests\test_path' </p> </blockquote> <blockquote> <p> directory_string = 'C:\Devel\projects\compiler_tests\test_path' </p> </blockquote> <p> Afterwards, I invoked remove_filename() on the above and again displayed a partial list of the properties of the result which are as follows: </p> <blockquote> <p> string = 'C:/Devel/projects/compiler_tests/' </p> </blockquote> <blockquote> <p> file_string = 'C:\Devel\projects\compiler_tests\' </p> </blockquote> <blockquote> <p> directory_string = 'C:\Devel\projects\compiler_tests\' </p> </blockquote> <p> Am I misunderstanding the documentation because the above is not the result that I expected. However, if I invoked remove_filename() on the above and displayed the partial list of the properties of the result, I get the following: </p> <blockquote> <p> string = 'C:/Devel/projects/compiler_tests' </p> </blockquote> <blockquote> <p> file_string = 'C:\Devel\projects\compiler_tests' </p> </blockquote> <blockquote> <p> directory_string = 'C:\Devel\projects\compiler_tests' </p> </blockquote> <p> The above is the result I expected from the initial invocation of remove_filename(). </p> <p> Please clarify. Please note that I am observing the same behavior on Fedora Linux and Solaris 10 x86. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5149 Trac 1.4.3 lcarreon@… Wed, 02 Feb 2011 21:02:51 GMT <link>https://svn.boost.org/trac10/ticket/5149#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5149#comment:1</guid> <description> <p> I have discovered that I'm seeing the above behavior because I'm using version 2 of the filesystem library. I have since switched to version 3 and the problem does not happen there. This bug report can be closed. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Thu, 03 Feb 2011 12:30:03 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5149#comment:2 https://svn.boost.org/trac10/ticket/5149#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">invalid</span> </li> </ul> Ticket