<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 2680: Add "Equivalent to" to filesystem</title>
<meta property="og:title" content="Issue 2680: Add &quot;Equivalent to&quot; to filesystem">
<meta property="og:description" content="C++ library issue. Status: C++17">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue2680.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#C++17">C++17</a> status.</em></p>
<h3 id="2680"><a href="lwg-defects.html#2680">2680</a>. Add "Equivalent to" to filesystem</h3>
<p><b>Section:</b> 31.12 <a href="https://wg21.link/filesystems">[filesystems]</a> <b>Status:</b> <a href="lwg-active.html#C++17">C++17</a>
 <b>Submitter:</b> Beman Dawes <b>Opened:</b> 2016-04-15 <b>Last modified:</b> 2017-07-30</p>
<p><b>Priority: </b>2
</p>
<p><b>View all other</b> <a href="lwg-index.html#filesystems">issues</a> in [filesystems].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#C++17">C++17</a> status.</p>
<p><b>Discussion:</b></p>
<p>The IS project editors have requested that filesystem <i>Effects</i> elements specified purely as C++ code 
include the phrase "Equivalent to" if this is the intent. They do not consider this change to be editorial.</p>

<p><i>[2016-08 Chicago]</i></p>

<p>Wed AM: Move to Tentatively Ready</p>


<p id="res-2680"><b>Proposed resolution:</b></p>
<p>
</p>

<p><i><section>31.12.6.5.5 <a href="https://wg21.link/fs.path.modifiers">[fs.path.modifiers]</a></section></i></p>
<blockquote>
<pre>path&amp; replace_filename(const path&amp; replacement);</pre>
<blockquote>
<p><i>Effects:</i> <ins>Equivalent to:</ins></p>
<pre>remove_filename();
operator/=(replacement);</pre>
</blockquote>
</blockquote>

<p><i><section>31.12.6.8 <a href="https://wg21.link/fs.path.nonmember">[fs.path.nonmember]</a></section></i></p>
<blockquote>
<pre>void swap(path&amp; lhs, path&amp; rhs) noexcept;</pre>
<blockquote>
<p><i>Effects:</i> <ins>Equivalent to:</ins> <code>lhs.swap(rhs)</code></p>
</blockquote>
</blockquote>

<p><i><section>31.12.6.7 <a href="https://wg21.link/fs.path.io">[fs.path.io]</a></section></i></p>
<blockquote>
<pre>template &lt;class charT, class traits&gt;
basic_ostream&lt;charT, traits&gt;&amp;
operator&lt;&lt;(basic_ostream&lt;charT, traits&gt;&amp; os, const path&amp; p);</pre>
<blockquote>
<p><i>Effects:</i> <ins>Equivalent to:</ins> <code>os &lt;&lt; quoted(p.string&lt;charT, traits&gt;())</code>.</p>
<pre></pre>
</blockquote>
</blockquote>

<p><i><section>31.12.6.7 <a href="https://wg21.link/fs.path.io">[fs.path.io]</a></section></i></p>
<blockquote>
<pre>template &lt;class charT, class traits&gt;
basic_istream&lt;charT, traits&gt;&amp;
operator&gt;&gt;(basic_istream&lt;charT, traits&gt;&amp; is, path&amp; p);</pre>
<blockquote>
<p><i>Effects:</i> <ins>Equivalent to:</ins></p>
<pre>basic_string&lt;charT, traits&gt; tmp;
is &gt;&gt; quoted(tmp);
p = tmp;</pre>
</blockquote>
</blockquote>

<p><i><section>31.12.13.4 <a href="https://wg21.link/fs.op.copy">[fs.op.copy]</a></section></i></p>
<blockquote>
<pre>void copy(const path&amp; from, const path&amp; to);
void copy(const path&amp; from, const path&amp; to, error_code&amp; ec) noexcept;</pre>
<blockquote>
<p><i>Effects:</i> <ins>Equivalent to:</ins> <code>copy(from, to, copy_options::none)</code> or <code>copy(from, to, 
copy_options::none, ec)</code>, respectively.</p>
</blockquote>
</blockquote>

<p><i><section> [fs.op.copy_symlink]</section></i></p>
<blockquote>
<pre>void copy_symlink(const path&amp; existing_symlink, const path&amp; new_symlink);
void copy_symlink(const path&amp; existing_symlink, const path&amp; new_symlink,
  error_code&amp; ec) noexcept;</pre>
<blockquote>
<p><i>Effects:</i> <ins>Equivalent to:</ins> <code><i>function</i>(read_symlink(existing_symlink), new_symlink)</code> or
<code><i>function</i>(read_symlink(existing_symlink, ec), new_symlink, ec)</code>, respectively, 
where <code><i>function</i></code>
is <code>create_symlink</code> or <code>create_directory_symlink</code>, as appropriate.</p>
</blockquote>
</blockquote>







</body>
</html>
