<h1 id="adding-operator-to-types-that-are-not-currently-comparable">Adding <code>operator&lt;=&gt;</code> to types that are not currently comparable</h1>
<pre>
Document Number: P1191R0
Date: 2018-08-22
Author: David Stone (&#100;&#97;&#118;&#105;&#100;&#109;&#115;&#116;&#111;&#110;&#101;&#64;&#103;&#111;&#111;&#103;&#108;&#101;&#46;&#99;&#111;&#109;, &#100;&#97;&#118;&#105;&#100;&#64;&#100;&#111;&#117;&#98;&#108;&#101;&#119;&#105;&#115;&#101;&#46;&#110;&#101;&#116;)
Audience: Library Evolution Working Group (LEWG)
</pre>

<h2 id="summary">Summary</h2>
<p>The following types do not currently have comparison operators. They should be modified as follows:</p>
<ul>
<li><code>filesystem::file_status</code>: <code>strong_equality</code></li>
<li><code>filesystem::space_info</code>: <code>strong_equality</code></li>
<li><code>slice</code>: <code>strong_equality</code></li>
<li><code>to_chars_result</code>: <code>strong_equality</code></li>
<li><code>from_chars_result</code>: <code>strong_equality</code></li>
</ul>
<h2 id="discussion">Discussion</h2>
<p><code>filesystem::file_status</code> is conceptually a struct with two enum data members (but with a get / set function interface). It is equal if both the <code>type</code> and the <code>permissions</code> compare equal.</p>
<p><code>filesystem::space_info</code> is a struct with three <code>uintmax_t</code> data members: <code>capacity</code>, <code>free</code>, and <code>available</code>. Two <code>space_info</code> objects compare equal if all data members compare equal.</p>
<p><code>slice</code> is conceptually a struct with three <code>size_t</code> data members (but with getters only): <code>start()</code>, <code>size()</code>, and <code>stride()</code>. Two <code>slice</code> objects compare equal if all three values are equal.</p>
<p>This paper does not propose adding <code>operator&lt;=&gt;</code> to <code>gslice</code>. This object is much like <code>slice</code> except <code>size</code> and <code>stride</code> are instances of <code>valarray&lt;size_t&gt;</code> rather than just <code>size_t</code>. Since <code>valarray</code> does not have a traditional comparison, we do not attempt to define the equivalent for <code>gslice</code>.</p>
<p><code>to_chars_result</code> is a struct that stores an iterator <code>ptr</code> and an <code>errc</code> <code>ec</code>. Two <code>to_chars_result</code> objects compare equal if both <code>ptr</code> and <code>ec</code> compare equal.</p>
<p><code>from_chars_result</code> is a struct that stores an iterator <code>ptr</code> and an <code>errc</code> <code>ec</code>. Two <code>from_chars_result</code> objects compare equal if both <code>ptr</code> and <code>ec</code> compare equal.</p>

