Skip to content

Commit

Permalink
[EDITORIAL] LWG Kona changes:
Browse files Browse the repository at this point in the history
* Use decltype(auto) instead of "see below" in declarations

* Insert missing semicolons in the specification of counted_iterator::operator++

* Simplify counted_iterator::operator++(int) by using pre-increment in the effects-equivalent-to, which notably "inherits" the Requires element.
  • Loading branch information
CaseyCarter committed Mar 15, 2017
1 parent d966cba commit cca6fb0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ext/post_inc/post_inc.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Change the class synopsis of `common_iterator` ([common.iterator]) as follows:
> <tt>&nbsp;&nbsp;public:</tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;// ... as before</tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<del>common_iterator operator++(int);</del></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins><i>see below</i> operator++(int);</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins>decltype(auto) operator++(int);</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins>common_iterator operator++(int)</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<ins>requires ForwardIterator&lt;I&gt;();</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;// ... as before</tt>
Expand Down Expand Up @@ -252,7 +252,7 @@ Change the class synopsis of `counted_iterator` ([counted.iterator]) as follows:
> <tt>&nbsp;&nbsp;public:</tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;// ... as before</tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<del>counted_iterator operator++(int);</del></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins><i>see below</i> operator++(int);</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins>decltype(auto) operator++(int);</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;<ins>counted_iterator operator++(int)</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<ins>requires ForwardIterator&lt;I&gt;();</ins></tt>
> <tt>&nbsp;&nbsp;&nbsp;&nbsp;// ... as before</tt>
Expand All @@ -267,7 +267,7 @@ Change [counted.iter.op.incr] as follows:
> >
> > > ```
> > > ++current;
> > > --cnt
> > > --cnt;
> > > ```
> >
> > 3 Returns: `*this.`
Expand All @@ -276,18 +276,18 @@ Change [counted.iter.op.incr] as follows:
> > <ins>4 Requires: `cnt > 0`.</ins>
> > <ins>5 Effects: Equivalent to:</ins>
> >
> > > <tt><ins>-\-cnt</ins></tt>
> > > <tt><ins>-\-cnt;</ins></tt>
> > > <tt><ins>return current++;</ins></tt>
>
> <tt>counted_iterator operator++(int)<del>;</del></tt>
> <tt>&nbsp;&nbsp;<ins>requires ForwardIterator&lt;I&gt;();</ins></tt>
> > 6 Requires: `cnt > 0`.
> > <del>6 Requires: `cnt > 0`.</del>
> > 7 Effects: Equivalent to:
> >
> > > ```
> > > counted_iterator tmp = *this;
> > > ++current;
> > > --cnt;
> > > <ins>++*this;</ins><del>++current;</del>
> > > <del>--cnt;</del>
> > > return tmp;
> > > ```

Expand Down

0 comments on commit cca6fb0

Please sign in to comment.