Skip to content

Commit

Permalink
Add deprecated path::generic()
Browse files Browse the repository at this point in the history
  • Loading branch information
Beman committed Nov 22, 2016
1 parent 2f4b634 commit 48faf2b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/release_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,29 @@
</td>
</table>

<h2>1.61.0</h2>
<h2>1.63.0</h2>
<ul>
<li dir="ltr">
<p dir="ltr"><b>Deprecated function name</b>: The undocumented experimental class
<code>path</code> member function <code>generic()</code> has been renamed <code>
generic_path()</code>. Fixes
<a href="https://svn.boost.org/trac/boost/ticket/11855">#11855</a>, <i>generic
gives problems in C++/CLI.</i> Unless the macro BOOST_FILESYSTEM_NO_DEPRECATED
is defined, the original <code>generic()</code> will continue to be supplied
as a workaround for existing user code. But <code>generic()</code>is
deprecated. User code should migrate to the new name.</li>
<li><b>New:</b> Class <code>path</code> adds constexpr constants <code>
separator</code> and <code>dot</code> of the type appropriate for the
platform, and adds query functions <a href="reference.html#filename_is_dot">
<code>filename_is_do</code>t</a> and <code>
<a href="reference.html#filename_is_dot­_dot">filename_is_dot_dot</a></code>.
These add convenience and the implementations may be more efficient that user
coded equivalent functions.</li>
<li>Fix broken link to
<a href="https://svn.boost.org/trac/boost/ticket/7506">#7506</a> in 1.60.0 Release History (Daniel Krügler).</li>
<li>Refactor <code>push_directory()</code>internal logic so it is easier to
reason about.<br>
&nbsp;</li>
</ul>

<h2>1.60.0</h2>
Expand Down Expand Up @@ -404,7 +418,7 @@ <h2>1.46.0</h2>
</ul>
<hr>
<p>Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->01 December, 2015<!--webbot bot="Timestamp" endspan i-checksum="38635" --></p>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->22 November, 2016<!--webbot bot="Timestamp" endspan i-checksum="39488" --></p>
<p>&copy; Copyright Beman Dawes, 2011</p>
<p> Use, modification, and distribution are subject to the Boost Software
License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">
Expand Down
1 change: 1 addition & 0 deletions include/boost/filesystem/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ namespace filesystem
path& remove_leaf() { return remove_filename(); }
path leaf() const { return filename(); }
path branch_path() const { return parent_path(); }
path generic() const { return generic_path(); }
bool has_leaf() const { return !m_pathname.empty(); }
bool has_branch_path() const { return !parent_path().empty(); }
bool is_complete() const { return is_absolute(); }
Expand Down
1 change: 1 addition & 0 deletions test/deprecated_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ int cpp_main(int /*argc*/, char* /*argv*/[])
misc_test();
path_rename_test();
normalize_test();
BOOST_TEST(fs::path("foo/bar").generic() == fs::path("foo/bar"));

// extension() tests ---------------------------------------------------------//

Expand Down

0 comments on commit 48faf2b

Please sign in to comment.