id summary reporter owner description type status milestone component version severity resolution keywords cc 7545 filesystem::path::filename() specification wrong? Stefan Große Pawig Beman Dawes "According to the [[http://www.boost.org/doc/libs/1_51_0/libs/filesystem/doc/reference.html#Definitions|definition]] section of the boost::filesystem documentation, * a **path** consists of a root-name, a root-directory and (as relative-path) a sequence of filenames (all optional) * a **filename** is the name of a file, with slashes explicitly forbidden as part of the filename With these definitions, paths consisting entirely of root-name and/or root-directory parts (like {{{ ""//net""}}}, {{{ ""//net/"" }}} and {{{ ""/""}}}) do not contain filenames. On the other hand, the specification of path::filename() says // Returns: // {{{ empty() ? path() : *--end() }}} without discrimination between the different parts. Consequently, * {{{ Path(""//net"").filename() == Path(""//net"") }}} * {{{ Path(""/"").filename() == Path(""/"") }}} instead of the expected empty {{{Path()}}}, and containing the forbidden slash. **Proposed fix:** \\ To become consistent with the definitions, path::filename() should be specified as follows: // Returns: // {{{ relative_path().empty() ? path() : *--end() }}} " Bugs new To Be Determined filesystem Boost 1.51.0 Problem