Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-06-24 21:47:16


Author: dgregor
Date: 2008-06-24 21:47:16 EDT (Tue, 24 Jun 2008)
New Revision: 46670
URL: http://svn.boost.org/trac/boost/changeset/46670

Log:
Prep iterator concepts document for next revision
Text files modified:
   sandbox/committee/concepts/stdlib/clib-concepts.tex | 2
   sandbox/committee/concepts/stdlib/clib-iterators.tex | 90 ++++++++++++++++-----------------------
   2 files changed, 39 insertions(+), 53 deletions(-)

Modified: sandbox/committee/concepts/stdlib/clib-concepts.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-concepts.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-concepts.tex 2008-06-24 21:47:16 EDT (Tue, 24 Jun 2008)
@@ -64,7 +64,7 @@
 Andrew Lumsdaine, Indiana University
 \end{tabular}\vspace{-6pt}
 
-\par\noindent Document number: D2677=08-0187\vspace{-6pt}
+\par\noindent Document number: N2677=08-0187\vspace{-6pt}
 \par\noindent Revises document number: N2621=08-0131\vspace{-6pt}
 \par\noindent Date: \today\vspace{-6pt}
 \par\noindent Project: Programming Language \Cpp{}, Library Working Group\vspace{-6pt}

Modified: sandbox/committee/concepts/stdlib/clib-iterators.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-iterators.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-iterators.tex 2008-06-24 21:47:16 EDT (Tue, 24 Jun 2008)
@@ -48,7 +48,7 @@
 \begin{center}
 \huge
 Iterator Concepts for the C++0x Standard Library\\
-(Revision 2)
+(Revision 3)
 \vspace{0.5in}
 
 \normalsize
@@ -57,8 +57,8 @@
 \end{center}
 
 \vspace{1in}
-\par\noindent Document number: N2624=08-0134 \vspace{-6pt}
-\par\noindent Revises document number: N2570=08-0080 \vspace{-6pt}
+\par\noindent Document number: DRAFT \vspace{-6pt}
+\par\noindent Revises document number: N2624=08-0134 \vspace{-6pt}
 \par\noindent Date: \today\vspace{-6pt}
 \par\noindent Project: Programming Language \Cpp{}, Library Working Group\vspace{-6pt}
 \par\noindent Reply-to: Douglas Gregor $<$\href{mailto:dgregor_at_[hidden]}{dgregor_at_[hidden]}$>$\vspace{-6pt}
@@ -145,7 +145,7 @@
   concept OutputIterator<typename X, typename Value> @\textit{see below}@;
   concept BasicOutputIterator<typename X> @\textit{see below}@;
 
- template<BasicOutputIterator X, @\changedCC{typename}{CopyAssignable}@ Value>
+ template<BasicOutputIterator X, CopyAssignable Value>
     requires HasCopyAssign<X::reference, Value>
     concept_map OutputIterator<X, Value> @\textit{see below}@;
 
@@ -403,22 +403,22 @@
 \color{addclr}
 \begin{codeblock}
 concept InputIterator<typename X> : Semiregular<X>, EqualityComparable<X> {
- @\changedCC{typename}{ObjectType}@ value_type = typename X::value_type;
+ ObjectType value_type = typename X::value_type;
   MoveConstructible reference = typename X::reference;
   MoveConstructible pointer = typename X::pointer;
 
- SignedIntegral@\addedCC{Like}@ difference_type = typename X::difference_type;
+ SignedIntegralLike difference_type = typename X::difference_type;
 
- requires @\addedCC{IntegralType<difference_type>}@
- && Convertible<reference, value_type @\addedCC{const \&}@>;
+ requires IntegralType<difference_type>
+ && Convertible<reference, const value_type &>;
         @\textcolor{addclr}{}@&& Convertible<pointer, const value_type*>;
 
   MoveConstructible postincrement_result;
   requires Dereferenceable<postincrement_result> &&
            @\textcolor{addclr}{}@Convertible<Dereferenceable<postincrement_result>::reference, value_type>;
 
- reference operator*(X @\addedCC{const\&}@);
- pointer operator->(X @\addedCC{const\&}@);
+ reference operator*(const X&);
+ pointer operator->(const X&);
   X& operator++(X&);
   postincrement_result operator++(X&, int);
 }
@@ -476,7 +476,7 @@
 
 \color{addclr}
 \begin{itemdecl}
-reference operator*(X @\addedCC{const\&}@ @\farg{a}@);
+reference operator*(const X& @\farg{a}@);
 \end{itemdecl}
 
 \pnum
@@ -495,7 +495,7 @@
 then \tcode{*a} is equivalent to \tcode{*b}.
 
 \begin{itemdecl}
-pointer operator->(X @\addedCC{const\&}@ a);
+pointer operator->(const X& a);
 \end{itemdecl}
 
 \pnum
@@ -504,7 +504,7 @@
   the iterator
 
 \begin{itemdecl}
-@\addedCC{bool operator==(X const\& a, X const\& b); // inherited from EqualityComparable<X>}@
+bool operator==(const X& a, const X& b); // inherited from EqualityComparable<X>
 \end{itemdecl}
 
 \pnum
@@ -532,7 +532,7 @@
 
 \pnum
 \effects\
-\addedCC{equivalent to \mbox{\tcode{\{ T tmp = *r; ++r; return tmp; \}}}.}
+equivalent to \mbox{\tcode{\{ T tmp = *r; ++r; return tmp; \}}}.
 
 \end{paras}
 
@@ -576,7 +576,7 @@
 \begin{itemdecl}
 concept OutputIterator<typename X, typename Value> : CopyConstructible<X> {
   typename reference;
- requires HasCopyAssign<reference, Value> \@addedCC{\&\& CopyAssignable<Value>}@;
+ requires HasCopyAssign<reference, Value> && CopyAssignable<Value>;
 
   typename postincrement_result;
   requires Dereferenceable<postincrement_result> &&
@@ -621,10 +621,10 @@
 \color{addclr}
 \begin{itemdecl}
 concept BasicOutputIterator<typename X> : CopyConstructible<X> {
- @\changedCC{typename}{ObjectType}@ value_type = typename X::value_type;
+ ObjectType value_type = typename X::value_type;
   MoveConstructible reference = typename X::reference;
 
- requires HasCopyAssign<reference, value_type> @\addedCC{\&\& CopyAssignable<value_type>}@;
+ requires HasCopyAssign<reference, value_type> && CopyAssignable<value_type>;
 
   typename postincrement_result;
   requires Dereferenceable<postincrement_result> &&
@@ -671,7 +671,7 @@
 
 \color{addclr}
 \begin{itemdecl}
-template<BasicOutputIterator X, @\changedCC{typename}{CopyAssignable}@ Value>
+template<BasicOutputIterator X, CopyAssignable Value>
 requires CopyAssignable<X::reference, Value>
 concept_map OutputIterator<X, Value> {
   typedef X::reference reference;
@@ -698,11 +698,11 @@
 concept ForwardIterator<typename X> : InputIterator<X>, Regular<X> {
   requires Convertible<postincrement_result, const X&>;
 
- @\addedCC{axiom MultiPass(X a, X b) \{}@
- @\addedCC{if (a == b) *a == *b;}@
- @\addedCC{if (a == b) ++a == ++b;}@
- @\addedCC{\&a == \&++a;}@
- @\addedCC{\}}@
+ axiom MultiPass(X a, X b) {
+ if (a == b) *a == *b;
+ if (a == b) ++a == ++b;
+ &a == &++a;
+ }
 }
 
 concept MutableForwardIterator<typename X> : ForwardIterator<X>, BasicOutputIterator<X> {
@@ -726,28 +726,14 @@
   random access iterator concepts.}
 
 \begin{itemdecl}
-@\addedCC{X::X(); // inherited from Regular<X>}@
+X::X(); // inherited from Regular<X>
 \end{itemdecl}
 
 \begin{itemdescr}
- \pnum \addedCC{\mbox{\reallynote} the constructed object might have
+ \pnum \addedConcepts{\mbox{\reallynote} the constructed object might have
     a singular value.}
 \end{itemdescr}
 
-\begin{itemdecl}
-@\removedCC{reference operator*(X\&);}@
-@\removedCC{reference operator*(X const\&);}@
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\removedCC{\mbox{\requires} If two iterators \mbox{\tcode{a}} and
- \mbox{\tcode{b}} of the same type are both dereferenceable, then
- \mbox{\tcode{a == b}} if and only if \mbox{\tcode{*a}} and
- \mbox{\tcode{*b}} are the same object.}
-
-\end{itemdescr}
-
 \textcolor{black}{}\pnum
 \enternote\
 The \changedConcepts{condition}{axiom} that
@@ -786,11 +772,11 @@
   X& operator--(X&);
   postdecrement_result operator--(X&, int);
 
- @\addedCC{axiom BackwardTraversal(X a, X b) \{}@
+ axiom BackwardTraversal(X a, X b) {
     --(++a) == a;
     if (--a == --b) a == b;
     &a == &--a;
- @\addedCC{\}}@
+ }
 }
 
 concept MutableBidirectionalIterator<typename X>
@@ -846,13 +832,13 @@
 \begin{itemdecl}
 concept RandomAccessIterator<typename X> : BidirectionalIterator<X>, LessThanComparable<X> {
   X& operator+=(X&, difference_type);
- X operator+ (X @\addedCC{const\&}@, difference_type);
- X operator+ (difference_type, X@\addedCC{const\&}@);
+ X operator+ (const X&, difference_type);
+ X operator+ (difference_type, const X&);
   X& operator-=(X&, difference_type);
- X operator- (X @\addedCC{const\&}@, difference_type);
+ X operator- (const X&, difference_type);
 
- difference_type operator-(X @\addedCC{const\&}@, X @\addedCC{const\&}@);
- reference operator[](X @\addedCC{const\&}@, difference_type);
+ difference_type operator-(const X&, const X&);
+ reference operator[](const X&, difference_type);
 }
 
 concept MutableRandomAccessIterator<typename X>
@@ -878,8 +864,8 @@
 \end{codeblock}
 
 \begin{itemdecl}
-X operator+(X @\addedCC{const\&}@ a, difference_type n);
-X operator+(difference_type n, X @\addedCC{const\&}@ a);
+X operator+(const X& a, difference_type n);
+X operator+(difference_type n, const X& a);
 \end{itemdecl}
 
 \pnum
@@ -903,7 +889,7 @@
 \tcode{r += -n}
 
 \begin{itemdecl}
-X operator-(X @\addedCC{const\&}@ a, difference_type n);
+X operator-(const X& a, difference_type n);
 \end{itemdecl}
 
 \pnum
@@ -915,7 +901,7 @@
 \end{codeblock}
 
 \begin{itemdecl}
-difference_type operator-(X @\addedCC{const\&}@ a, X @\addedCC{const\&}@ b);
+difference_type operator-(const X& a, const X& b);
 \end{itemdecl}
 
 \pnum
@@ -999,12 +985,12 @@
 \color{addclr}
 \begin{itemdecl}
 auto concept SwappableIterator<typename X> {
- void iter_swap(X @\addedCC{const\&}@, X @\addedCC{const\&}@);
+ void iter_swap(const X&, const X&);
 }
 \end{itemdecl}
 
 \begin{itemdecl}
-void iter_swap(X @\addedCC{const\&}@ a, X @\addedCC{const\&}@ b);
+void iter_swap(const X& a, const X& b);
 \end{itemdecl}
 \color{black}
 


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