Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-06-29 19:56:07


Author: dgregor
Date: 2008-06-29 19:56:07 EDT (Sun, 29 Jun 2008)
New Revision: 46875
URL: http://svn.boost.org/trac/boost/changeset/46875

Log:
Update concept requirements for vector
Text files modified:
   sandbox/committee/concepts/stdlib/clib-algorithms.tex | 15 +++---
   sandbox/committee/concepts/stdlib/clib-containers.tex | 93 +++++++++++++++++++++++----------------
   2 files changed, 63 insertions(+), 45 deletions(-)

Modified: sandbox/committee/concepts/stdlib/clib-algorithms.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-algorithms.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-algorithms.tex 2008-06-29 19:56:07 EDT (Sun, 29 Jun 2008)
@@ -53,16 +53,17 @@
 \huge
 Concepts for the C++0x Standard Library: Algorithms \\
 (Revision 3)
-
-\vspace{0.5in}
-
 \normalsize
-Douglas Gregor and Andrew Lumsdaine \\
-Open Systems Laboratory, Indiana University \\
-\href{mailto:dgregor_at_[hidden]}{dgregor_at_[hidden]}, \href{mailto:lums_at_[hidden]}{lums_at_[hidden]}
 \end{center}
 
-\vspace{1in}
+\vspace{0.5in}
+\par\noindent Authors:
+\begin{tabular}[t]{l}
+Douglas Gregor, Indiana University \\
+Mat Marcus, Adobe Systems, Inc.\\
+Thomas Witt, Zephyr Associates, Inc.\\
+Andrew Lumsdaine, Indiana University
+\end{tabular}\vspace{-6pt}
 \par\noindent Document number: D2696=08-0206\vspace{-6pt}
 \par\noindent Revises document number: N2625=08-0135\vspace{-6pt}
 \par\noindent Date: \today\vspace{-6pt}

Modified: sandbox/committee/concepts/stdlib/clib-containers.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-containers.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-containers.tex 2008-06-29 19:56:07 EDT (Sun, 29 Jun 2008)
@@ -51,16 +51,17 @@
 \huge
 Concepts for the C++0x Standard Library: Containers\\
 (Revision 2)
-
-\vspace{0.5in}
+\end{center}
 
 \normalsize
-Douglas Gregor, Indiana University $\langle$\href{mailto:dgregor_at_[hidden]}{dgregor_at_[hidden]}$\rangle$ \\
-Pablo Halpern, Bloomberg, L.P. $\langle$\href{mailto:phalpern_at_[hidden]}{phalpern_at_[hidden]}$\rangle$
 
-\end{center}
-
-\vspace{1in}
+\vspace{0.5in}
+\par\noindent Authors:
+\begin{tabular}[t]{l}
+Douglas Gregor, Indiana University \\
+Mat Marcus, Adobe Systems, Inc.\\
+Pablo Halpern, Bloomberg, L.P.
+\end{tabular}\vspace{-6pt}
 \par\noindent Document number: D2694=08-0204\vspace{-6pt}
 \par\noindent Revises document number: N2623=08-0133\vspace{-6pt}
 \par\noindent Date: \today\vspace{-6pt}
@@ -3354,7 +3355,7 @@
 The elements of a vector are stored contiguously, meaning that if
 \tcode{v}\
 is a
-\tcode{vector<T, Alloc@\removedConcepts{ator}@>}\
+\tcode{vector<T, Alloc\removedConcepts{ator}>}\
 where
 \tcode{T}\
 is some type other than
@@ -3389,26 +3390,30 @@
 
     // \ref{vector.cons} construct/copy/destroy:
     explicit vector(const Alloc@\removedConcepts{ator}@& = Alloc@\removedConcepts{ator}@());
- @\addedConcepts{requires DefaultConstructible<T>}@
+ @\addedConcepts{requires} \changedCCC{DefaultConstructible<T>}{ConstructibleAsElement<Alloc, T>}@
       explicit vector(size_type n);
     @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@
       vector(size_type n, const T& value, const Alloc@\removedConcepts{ator}@& = Alloc@\removedConcepts{ator}@());
     template <@\changedConcepts{class InputIterator}{InputIterator Iter}@>
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference>}@ @\addedCC{\&\& MoveConstructible<T>}@
+ @\removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
       vector(@\changedConcepts{InputIterator}{Iter}@ first, @\changedConcepts{InputIterator}{Iter}@ last,
              const Alloc@\removedConcepts{ator}@& = Alloc@\removedConcepts{ator}@());
     @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ vector(const vector<T,Alloc@\removedConcepts{ator}@>& x);
- vector(vector&&);
+ @\addedCC{requires ConstructibleAsElement<Alloc, T, T\&\&>}@ vector(vector&&);
     @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ vector(const vector&, const Alloc@\removedConcepts{ator}@&);
- vector(vector&&, const Alloc@\removedConcepts{ator}@&);
+ @\addedCC{requires ConstructibleAsElement<Alloc, T, T\&\&>}@ vector(vector&&, const Alloc@\removedConcepts{ator}@&);
    ~vector();
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ @\addedCC{\&\& CopyAssignable<T>}@
       vector<T,Alloc@\removedConcepts{ator}@>& operator=(const vector<T,Alloc@\removedConcepts{ator}@>& x);
- vector<T,Alloc@\removedConcepts{ator}@>& operator=(vector<T,Alloc@\removedConcepts{ator}@>&& x);
+ @\addedCC{requires ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@
+ vector<T,Alloc@\removedConcepts{ator}@>& operator=(vector<T,Alloc@\removedConcepts{ator}@>&& x);
     template <@\changedConcepts{class InputIterator}{InputIterator Iter}@>
       @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference>}@
+ @\addedCC{\&\& HasAssign<T, Iter::reference>}@
+ @\addedCC{\&\& MoveConstructible<T>}@
       void assign(@\changedConcepts{InputIterator}{Iter}@ first, @\changedConcepts{InputIterator}{Iter}@ last);
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ @\addedCC{\&\& CopyAssignable<T>}@
       void assign(size_type n, const T& u);
     allocator_type get_allocator() const;
 
@@ -3430,12 +3435,14 @@
     // \ref{vector.capacity} capacity:
     size_type size() const;
     size_type max_size() const;
- @\addedConcepts{requires DefaultConstructible<T> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires} \removedCCC{DefaultConstructible<T> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedCC{ConstructibleAsElement<Alloc, T> \&\& MoveConstructible<T>}@
       void resize(size_type sz);
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ void resize(size_type sz, const T& c);
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ @\addedCC{\&\& MoveConstructible<T>}@
+ void resize(size_type sz, const T& c);
     size_type capacity() const;
     bool empty() const;
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, T\&\&>}@ void reserve(size_type n);
+ @\addedConcepts{requires} \changedCCC{ConstructibleAsElement<Alloc, T, T\&\&>}{MoveConstructible<T>}@ void reserve(size_type n);
 
     // element access:
     reference operator[](size_type n);
@@ -3453,22 +3460,24 @@
 
     // \ref{vector.modifiers} modifiers:
     template <class... Args>
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...>} \removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedCC{\&\& MoveConstructible<T>}@
       void push_back(Args&&... args);
     void pop_back();
 
     template <class... Args>
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...>} \removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedCC{\&\& MoveAssignable<T> \&\& MoveConstructible<T>}@
       iterator emplace(const_iterator position, Args&&... args);
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ @\addedConcepts{\&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
       iterator insert(const_iterator position, const T& x);
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
       void insert(const_iterator position, T&& x);
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
       void insert(const_iterator position, size_type n, const T& x);
     template <@\changedConcepts{class InputIterator}{InputIterator Iter}@>
         @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference>}@
- @\addedConcepts{\&\& ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@
+ @\removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>} \addedConcepts{\&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
         void insert(const_iterator position,
                     @\changedConcepts{InputIterator}{Iter}@ first, @\changedConcepts{InputIterator}{Iter}@ last);
     @\addedConcepts{requires MoveAssignable<T>}@ iterator erase(const_iterator position);
@@ -3524,7 +3533,7 @@
 
 \index{vector@\tcode{vector}!\tcode{vector}}
 \begin{itemdecl}
-@\addedConcepts{requires DefaultConstructible<T>}@ explicit vector(size_type n);
+@\addedConcepts{requires} \changedCCC{DefaultConstructible<T>}{ConstructibleAsElement<Alloc, T>}@ explicit vector(size_type n);
 \end{itemdecl}
 
 \begin{itemdescr}
@@ -3561,7 +3570,8 @@
 \index{vector@\tcode{vector}!\tcode{vector}}
 \begin{itemdecl}
 template <@\changedConcepts{class InputIterator}{InputIterator Iter}@>
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference>} \addedCC{\&\& MoveConstructible<T>}@
+ @\removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
   vector(@\changedConcepts{InputIterator}{Iter}@ first, @\changedConcepts{InputIterator}{Iter}@ last,
          const Alloc@\removedConcepts{ator}@& = Alloc@\removedConcepts{ator}@());
 \end{itemdecl}
@@ -3596,6 +3606,8 @@
 \begin{itemdecl}
 template <@\changedConcepts{class InputIterator}{InputIterator Iter}@>
   @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference>}@
+ @\addedCC{\&\& HasAssign<T, Iter::reference>}@
+ @\addedCC{\&\& MoveConstructible<T>}@
   void assign(@\changedConcepts{InputIterator}{Iter}@ first, @\changedConcepts{InputIterator}{Iter}@ last);
 \end{itemdecl}
 
@@ -3609,7 +3621,7 @@
 \end{itemdescr}
 
 \begin{itemdecl}
-@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@
+@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ @\addedCC{\&\& CopyAssignable<T>}@
   void assign(size_type n, const T& t);
 \end{itemdecl}
 
@@ -3638,7 +3650,7 @@
 
 \index{reserve@\tcode{reserve}!\tcode{vector}}%
 \begin{itemdecl}
-@\addedConcepts{requires ConstructibleAsElement<Alloc, T, T\&\&>}@ void reserve(size_type n);
+@\addedConcepts{requires} \changedCCC{ConstructibleAsElement<Alloc, T, T\&\&>}{MoveConstructible<T>}@ void reserve(size_type n);
 \end{itemdecl}
 
 \pnum
@@ -3713,7 +3725,9 @@
 
 \index{resize@\tcode{resize}!\tcode{vector}}%
 \begin{itemdecl}
-@\addedConcepts{requires DefaultConstructible<T> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@ void resize(size_type sz);
+@\addedConcepts{requires} \removedCCC{DefaultConstructible<T> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedCC{ConstructibleAsElement<Alloc, T> \&\& MoveConstructible<T>}@
+ void resize(size_type sz);
 \end{itemdecl}
 
 \begin{itemdescr}
@@ -3724,13 +3738,14 @@
 sequence.
 
 \pnum
-\requires \tcode{T} shall be
-\tcode{DefaultConstructible}.
+\removedCC{\mbox{\requires} \mbox{\tcode{T}} shall be
+\mbox{\tcode{DefaultConstructible}}.}
 \end{itemdescr}
 
 \index{resize@\tcode{resize}!\tcode{vector}}%
 \begin{itemdecl}
-@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ void resize(size_type sz, const T& c);
+@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&>}@ @\addedCC{\&\& MoveConstructible<T>}@
+ void resize(size_type sz, const T& c);
 \end{itemdecl}
 
 \begin{itemdescr}
@@ -3776,23 +3791,25 @@
 
 \index{insert@\tcode{insert}!\tcode{vector}}%
 \begin{itemdecl}
-@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@
+@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
   iterator insert(const_iterator position, const T& x);
-@\addedConcepts{requires ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@
+@\addedConcepts{requires ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
   iterator insert(const_iterator position, T&& x);
-@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@
+@\addedConcepts{requires ConstructibleAsElement<Alloc, T, const T\&> \&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
   void insert(const_iterator position, size_type n, const T& x);
 template <@\changedConcepts{class InputIterator}{InputIterator Iter}@>
     @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Iter::reference>}@
- @\addedConcepts{\&\& ConstructibleAsElement<Alloc, T, T\&\&> \&\& MoveAssignable<T>}@
+ @\removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>} \addedConcepts{\&\& MoveAssignable<T>}@ @\addedCC{\&\& MoveConstructible<T>}@
     void insert(const_iterator position,
                 @\changedConcepts{InputIterator}{Iter}@ first, @\changedConcepts{InputIterator}{Iter}@ last);
 
 template <class... Args>
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...>} \removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedCC{\&\& MoveConstructible<T>}@
   void push_back(Args&&... args);
 template <class... Args>
- @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...> \&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedConcepts{requires ConstructibleAsElement<Alloc, T, Args\&\&...>} \removedCCC{\&\& ConstructibleAsElement<Alloc, T, T\&\&>}@
+ @\addedCC{\&\& MoveAssignable<T> \&\& MoveConstructible<T>}@
   iterator emplace(const_iterator position, Args&&... args);
 \end{itemdecl}
 


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