Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-03-14 16:57:51


Author: dgregor
Date: 2008-03-14 16:57:50 EDT (Fri, 14 Mar 2008)
New Revision: 43609
URL: http://svn.boost.org/trac/boost/changeset/43609

Log:
HasEquals to HasEqualTo
Text files modified:
   sandbox/committee/concepts/issues/issues/issue1.xml | 22 ++--
   sandbox/committee/concepts/issues/issues/issue13.xml | 139 +++++++++++++++++++++++++++++
   sandbox/committee/concepts/issues/issues/issue5.xml | 189 ++++++++++++++++++++++++++++++++++++++++
   3 files changed, 339 insertions(+), 11 deletions(-)

Modified: sandbox/committee/concepts/issues/issues/issue1.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue1.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue1.xml 2008-03-14 16:57:50 EDT (Fri, 14 Mar 2008)
@@ -25,12 +25,12 @@
     <p>General issue: do we accept the naming convention that purely
       syntactic concepts should be named Has*?</p>
 
- <p>If we do have a two-parameter HasEquals, do we also want it to
+ <p>If we do have a two-parameter HasEqualTo, do we also want it to
       provide != ? In other words, does it have any kind of semantic
       coherency? </p>
 
- <p>Can we make the two-parameter HasEquals symmetrical? That is:
- if we say that there is a HasEquals for types T and U, and if t
+ <p>Can we make the two-parameter HasEqualTo symmetrical? That is:
+ if we say that there is a HasEqualTo for types T and U, and if t
       and u are variables of the appropriate types, can we at least
       say that t == u and u == t are both allowed and both mean the
       same thing? Is there any way to write defaults in the concept
@@ -40,7 +40,7 @@
   <resolution>
     <p>Split the <code>EqualityComparable</code>
     and <code>LessThanComparable</code> concepts into purely syntactic
- concepts (<code>HasEquals</code>, <code>HasLessThan</code>) and
+ concepts (<code>HasEqualTo</code>, <code>HasLessThan</code>) and
     semantic concepts that refine them
     (<code>EqualityComparable</code>, <code>LessThanComparable</code>). In
     [utility.concepts], update the &lt;concepts&gt; header synopsis as
@@ -57,7 +57,7 @@
 
 auto concept HasNegate&lt;typename T&gt; <i>see below</i>;
 <ins>auto concept HasLess&lt;typename T, typename U = T&gt; <i>see below</i>;</ins>
-<ins>auto concept HasEquals&lt;typename T, typename U = T&gt; <i>see below</i>;</ins>
+<ins>auto concept HasEqualTo&lt;typename T, typename U = T&gt; <i>see below</i>;</ins>
 auto concept HasLogicalAnd&lt;typename T, typename U = T&gt; <i>see below</i>;
       </pre>
     </p>
@@ -100,7 +100,7 @@
 
     <p>Change [concept.comparison] paragraphs 3 and 4 as follows:
       <pre>
-auto concept EqualityComparable&lt;typename T<del>, typename U = T</del>&gt;<ins> : HasEquals&lt;T&gt;</ins> {
+auto concept EqualityComparable&lt;typename T<del>, typename U = T</del>&gt;<ins> : HasEqualTo&lt;T&gt;</ins> {
  <del>bool operator==(T const&amp; a, U const&amp; b);</del>
  bool operator!=(T const&amp; a, <del>U</del><ins>T</ins> const&amp; b) { return !(a == b); }
 
@@ -118,10 +118,10 @@
 }
       </pre>
 <ol start="3">
- <li>&nbsp;&nbsp;&nbsp;&nbsp;<del><i>Note</i>: describes types whose
- values can be compared for equality with <code>operator==</code>.</del></li>
+ <li>&nbsp;&nbsp;&nbsp;&nbsp;<i>Note</i>: describes types whose
+ values can be compared for equality with <code>operator==</code><ins>, which is an equivalence relation</ins>.</li>
 
- <li>&nbsp;&nbsp;&nbsp;&nbsp;<i>Requires</i>: <del>when <code>T</code> and <code>U</code> are identical, </del><code>operator==</code> is an equivalence relation<del> that is, it has the following properties:</del><ins>.</ins>
+ <li>&nbsp;&nbsp;&nbsp;&nbsp;<del><i>Requires</i>: when <code>T</code> and <code>U</code> are identical, <code>operator==</code> is an equivalence relation that is, it has the following properties:</del>
       <ul>
         <li><del>For all a, a == a.</del></li>
         <li><del>If a == b, then b == a.</del></li>
@@ -142,7 +142,7 @@
       </ol>
 
       <pre>
-<ins>auto concept HasEquals&lt; typename T, typename U = T&gt; {
+<ins>auto concept HasEqualTo&lt; typename T, typename U = T&gt; {
   bool operator==(const T&amp; a, const U&amp; b);
 }</ins>
       </pre>
@@ -153,7 +153,7 @@
 
     <p>Note that this change also requires renaming two-parameter uses
     of <code>EqualityComparable</code>
- and <code>LessThanComparable</code> to <code>HasEquals</code>
+ and <code>LessThanComparable</code> to <code>HasEqualTo</code>
     and <code>HasLess</code>, respectively.</p>
   </resolution>
 </issue>

Modified: sandbox/committee/concepts/issues/issues/issue13.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue13.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue13.xml 2008-03-14 16:57:50 EDT (Fri, 14 Mar 2008)
@@ -21,4 +21,143 @@
   different naming convention.)</p>
 </discussion>
 
+<resolution>
+<p>The following table provides the names of operators, the function
+ objects associated with that name in the &lt;functional&gt; header,
+ and the proposed concept name.</p>
+
+<table border="1">
+ <tr>
+ <th bgcolor="#ffffcc">Operator</th>
+ <th bgcolor="#ffffcc">Function object</th>
+ <th bgcolor="#ffffcc">Concept</th>
+ </tr>
+ <tr>
+ <td><code>+</code> (binary)</td>
+ <td><code>plus</code></td>
+ <td><code>HasPlus</code></td>
+ </tr>
+ <tr>
+ <td><code>-</code> (binary)</td>
+ <td><code>minus</code></td>
+ <td><code>HasMinus</code></td>
+ </tr>
+ <tr>
+ <td><code>*</code> (binary)</td>
+ <td><code>multiplies</code></td>
+ <td><code>HasMultiply</code></td>
+ </tr>
+ <tr>
+ <td><code>/</code></td>
+ <td><code>divides</code></td>
+ <td><code>HasDivide</code></td>
+ </tr>
+ <tr>
+ <td><code>%</code></td>
+ <td><code>modulus</code></td>
+ <td><code>HasModulus</code></td>
+ </tr>
+ <tr>
+ <td><code>+</code> (unary)</td>
+ <td>N/A</td>
+ <td><code>HasUnaryPlus</code></td>
+ </tr>
+ <tr>
+ <td><code>-</code> (unary)</td>
+ <td><code>negate</code></td>
+ <td><code>HasNegate</code></td>
+ </tr>
+ <tr>
+ <td><code>&lt;</code></td>
+ <td><code>less</code></td>
+ <td><code>HasLess</code> (see issue <iref ref="1"/>)</td>
+ </tr>
+ <tr>
+ <td><code>&gt;</code></td>
+ <td><code>greater</code></td>
+ <td>N/A. Part of <code>LessThanComparable</code></td>
+ </tr>
+ <tr>
+ <td><code>&lt;=</code></td>
+ <td><code>less_equal</code></td>
+ <td>N/A. Part of <code>LessThanComparable</code></td>
+ </tr>
+ <tr>
+ <td><code>&gt;=</code></td>
+ <td><code>greater_equal</code></td>
+ <td>N/A. Part of <code>LessThanComparable</code></td>
+ </tr>
+ <tr>
+ <td><code>==</code></td>
+ <td><code>equal_to</code></td>
+ <td><code>HasEqualTo</code> (see issue <iref ref="1"/>)</td>
+ </tr>
+ <tr>
+ <td><code>!=</code></td>
+ <td><code>not_equal_to</code></td>
+ <td>N/A. Part of <code>EqualityComparable</code></td>
+ </tr>
+ <tr>
+ <td><code>&amp;&amp;</code></td>
+ <td><code>logical_and</code></td>
+ <td><code>HasLogicalAnd</code></td>
+ </tr>
+ <tr>
+ <td><code>||</code></td>
+ <td><code>logical_or</code></td>
+ <td><code>HasLogicalOr</code></td>
+ </tr>
+ <tr>
+ <td><code>!</code></td>
+ <td><code>logical_not</code></td>
+ <td><code>HasLogicalNot</code></td>
+ </tr>
+ <tr>
+ <td><code>&amp;</code> (binary)</td>
+ <td><code>bit_and</code></td>
+ <td><code>HasBitAnd</code></td>
+ </tr>
+ <tr>
+ <td><code>|</code></td>
+ <td><code>bit_or</code></td>
+ <td><code>HasBitOr</code></td>
+ </tr>
+ <tr>
+ <td><code>^</code></td>
+ <td><code>bit_xor</code></td>
+ <td><code>HasBitXor</code></td>
+ </tr>
+ <tr>
+ <td><code>~</code></td>
+ <td>N/A</td>
+ <td><code>HasComplement</code></td>
+ </tr>
+ <tr>
+ <td><code>&lt;&lt;</code></td>
+ <td>N/A</td>
+ <td><code>HasLeftShift</code></td>
+ </tr>
+ <tr>
+ <td><code>&gt;&gt;</code></td>
+ <td>N/A</td>
+ <td><code>HasRightShift</code></td>
+ </tr>
+ <tr>
+ <td><code>*</code> (unary)</td>
+ <td>N/A</td>
+ <td><code>Dereferenceable</code></td>
+ </tr>
+ <tr>
+ <td><code>&amp;</code> (unary)</td>
+ <td>N/A</td>
+ <td><code>Addressable</code></td>
+ </tr>
+ <tr>
+ <td><code>()</code></td>
+ <td>N/A</td>
+ <td><code>Callable</code></td>
+ </tr>
+</table>
+</resolution>
+
 </issue>

Modified: sandbox/committee/concepts/issues/issues/issue5.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue5.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue5.xml 2008-03-14 16:57:50 EDT (Fri, 14 Mar 2008)
@@ -21,4 +21,193 @@
 </p>
 </discussion>
 
+<resolution>
+ <p>The table provides the proposed mapping between type traits and concepts.</p>
+ <table border="1">
+ <tr>
+ <th bgcolor="#ffffcc">Type trait</th>
+ <th bgcolor="#ffffcc">Concept</th>
+ </tr>
+ <tr>
+ <td><code>is_void</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_integral</code></td>
+ <td><code>IntegralType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_floating_point</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_array</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_pointer</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_lvalue_reference</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_rvalue_reference</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_member_object_pointer</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_member_function_pointer</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_enum</code></td>
+ <td><code>EnumerationType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_union</code></td>
+ <td><code>Union</code></td>
+ </tr>
+ <tr>
+ <td><code>is_class</code></td>
+ <td><code>Class</code></td>
+ </tr>
+ <tr>
+ <td><code>is_function</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_reference</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_arithmetic</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_fundamental</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_object</code></td>
+ <td><code>ObjectType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_scalar</code></td>
+ <td><code>ScalarType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_compound</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_member_pointer</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_const</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_volatile</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_trivial</code></td>
+ <td><code>TrivialType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_standard_layout</code></td>
+ <td><code>StandardLayoutType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_pod</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_empty</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_polymorphic</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_abstract</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>has_trivial_default_constructor</code></td>
+ <td><code>TriviallyDefaultConstructible</code></td>
+ </tr>
+ <tr>
+ <td><code>has_trivial_copy_constructor</code></td>
+ <td><code>TriviallyCopyConstructible</code></td>
+ </tr>
+ <tr>
+ <td><code>has_trivial_assign</code></td>
+ <td><code>TriviallyCopyAssignable</code></td>
+ </tr>
+ <tr>
+ <td><code>has_trivial_destructor</code></td>
+ <td><code>TriviallyDestructible</code></td>
+ </tr>
+ <tr>
+ <td><code>has_nothrow_default_constructor</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>has_nothrow_copy_constructor</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>has_nothrow_assign</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>has_virtual_destructor</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_signed</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_unsigned</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>alignment_of</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>rank</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>extend</code></td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td><code>is_same</code></td>
+ <td><code>SameType</code></td>
+ </tr>
+ <tr>
+ <td><code>is_base_of</code></td>
+ <td><code>DerivedFrom</code></td>
+ </tr>
+ <tr>
+ <td><code>is_convertible</code></td>
+ <td><code>Convertible</code></td>
+ </tr>
+ <tr>
+ <td bgcolor="#ffffcc" colspan="2" align="center">Transformation/modification traits don't make sense with concepts</td>
+ </tr>
+ </table>
+</resolution>
+
 </issue>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk