Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-06-28 22:02:47


Author: dgregor
Date: 2008-06-28 22:02:46 EDT (Sat, 28 Jun 2008)
New Revision: 46833
URL: http://svn.boost.org/trac/boost/changeset/46833

Log:
Add Movable and MovableIterator requirements where needed
Text files modified:
   sandbox/committee/concepts/stdlib/clib-algorithms.tex | 140 +++++++++++++++++++++++----------------
   sandbox/committee/concepts/stdlib/lib-issues.txt | 26 +++----
   2 files changed, 92 insertions(+), 74 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-28 22:02:46 EDT (Sat, 28 Jun 2008)
@@ -34,6 +34,8 @@
 \setlength{\evensidemargin}{0pt}
 \setlength{\textwidth}{6.6in}
 
+\newcommand{\resetcolor}{\textcolor{addclr}{}}
+
 %%--------------------------------------------------
 %% Handle special hyphenation rules
 \hyphenation{tem-plate ex-am-ple in-put-it-er-a-tor}
@@ -82,6 +84,15 @@
 \item Changed \tcode{adjacent_find}'s \tcode{HasEqualTo} requirement
   to use \tcode{EqualityComparable}.
 \item Fixed types in the parameter types of \tcode{mismatch}
+\item Removed every use of the \tcode{Mutable} iterator concepts, which no longer exist.
+\item Removed the \tcode{SameType} constraints from \tcode{merge},
+ \tcode{includes}, \tcode{set_union}, \tcode{set_intersection},
+ \tcode{set_difference}, and \tcode{set_symmetric_difference}, to
+ match C++03 requirements.
+\item Introduce the use of the \tcode{MovableIterator} concept, for
+ algorithms that require the ability to move elements between the
+ sequence and a variable of the iterator \tcode{value_type} (e.g.,
+ \tcode{sort}).
 \end{itemize}
 
 \end{titlepage}
@@ -234,17 +245,21 @@
                           OutIter @\farg{result}@);
 
   @\textcolor{black}{// \ref{alg.move}, move:}@
- template<InputIterator InIter, OutputIterator<auto, InIter::value_type&&> OutIter>
+ template<InputIterator InIter, @\changedCCC{OutputIterator<auto, InIter::value_type\&\&>}{typename}@ OutIter>
+ @\addedCC{requires Movable<InIter::reference>}@
+ @\addedCC{\&\& OutputIterator<OutIter, Movable<InIter::reference>::result_type>}@
     OutIter move(InIter @\farg{first}@, InIter @\farg{last}@,
                  OutIter @\farg{result}@);
   template<BidirectionalIterator InIter, BidirectionalIterator OutIter>
- requires @\changedCCC{HasMoveAssign}{OutputIterator}@<OutIter@\removedCCC{::reference}@, InIter::value_type@\addedCC{\&\&}@>
+ requires @\removedCCC{HasMoveAssign<OutIter::reference, InIter::value_type>}@
+ @\addedCC{Movable<InIter::reference>}@
+ @\addedCC{\&\& OutputIterator<OutIter, Movable<InIter::reference>::result_type>}@
     OutIter move_backward(InIter @\farg{first}@, InIter @\farg{last}@,
                           OutIter @\farg{result}@);
 
   @\textcolor{black}{// \ref{alg.swap}, swap:}@
   template<class T>
- requires MoveAssignable<T> && MoveConstructible<T> @\addedCC{\&\& HasDestructor<T>}@
+ requires MoveAssignable<T> && MoveConstructible<T> @\addedCC{\&\& NothrowDestructible<T>}@
     void swap(T& @\farg{a}@, T& @\farg{b}@);
   template<@\removedCCC{Mutable}@ForwardIterator Iter1, @\removedCCC{Mutable}@ForwardIterator Iter2>
     requires @\addedCC{HasSwap<Iter1::reference, Iter2::reference>}@
@@ -263,13 +278,15 @@
     void iter_swap(Iter1 @\farg{a}@, Iter2 @\farg{b}@);
 
   template<InputIterator InIter, class OutIter,
- Callable<auto, InIter::reference> Op>
+ Callable<auto, @\changedCCC{InIter::reference}{const InIter::value_type\&}@> Op>
     requires OutputIterator<OutIter, Op::result_type>
           @\addedCC{\&\& CopyConstructible<Op>}@
     OutIter transform(InIter @\farg{first}@, InIter @\farg{last}@,
                       OutIter @\farg{result}@, Op @\farg{op}@);
   template<InputIterator InIter1, InputIterator InIter2,
- class OutIter, Callable<auto, InIter1::reference, InIter2::reference> BinaryOp>
+ class OutIter,
+ Callable<auto, @\changedCCC{InIter1::reference}{const InIter1::value_type\&}@,
+ @\changedCCC{InIter2::reference}{const InIter2::value_type\&}@> BinaryOp>
     requires OutputIterator<OutIter, BinaryOp::result_type>
           @\addedCC{\&\& CopyConstructible<BinaryOp>}@
     OutIter transform(InIter1 @\farg{first1}@, InIter1 @\farg{last1}@,
@@ -323,7 +340,8 @@
     void generate_n(Iter @\farg{first}@, Size @\farg{n}@, Generator @\farg{gen}@);
 
   template<ForwardIterator Iter, class T>
- requires @\changedCCC{MoveAssignable}{OutputIterator}@<@\addedCC{Iter, }@Iter::reference> && HasEqualTo<Iter::@\changedCCC{reference}{value_type}@, T>
+ requires @\changedCCC{MoveAssignable}{OutputIterator}@<@\addedCC{Iter, }@Iter::reference>
+ && HasEqualTo<Iter::@\changedCCC{reference}{value_type}@, T>
     Iter remove(Iter @\farg{first}@, Iter @\farg{last}@,
                 const T& @\farg{value}@);
   template<ForwardIterator Iter, Predicate<auto, Iter::@\changedCCC{reference}{value_type}@> Pred>
@@ -431,43 +449,43 @@
           @\addedCC{\&\& CopyConstructible<Pred>}@
     Iter partition(Iter @\farg{first}@, Iter @\farg{last}@, Pred @\farg{pred}@);
   template<BidirectionalIterator Iter, Predicate<auto@\addedCC{,}@ Iter::@\changedCCC{reference}{value_type}@> Pred>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Pred>}@
     Iter stable_partition(Iter @\farg{first}@, Iter @\farg{last}@, Pred @\farg{pred}@);
 
   @\textcolor{black}{// \ref{alg.sorting}, sorting and related operations:}@
   @\textcolor{black}{// \ref{alg.sort}, sorting:}@
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void sort(Iter @\farg{first}@, Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
             @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void sort(Iter @\farg{first}@, Iter @\farg{last}@,
               Compare @\farg{comp}@);
 
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void stable_sort(Iter @\farg{first}@, Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void stable_sort(Iter @\farg{first}@, Iter @\farg{last}@,
                      Compare @\farg{comp}@);
 
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void partial_sort(Iter @\farg{first}@,
                       Iter @\farg{middle}@,
                       Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void partial_sort(Iter @\farg{first}@,
                       Iter @\farg{middle}@,
@@ -509,7 +527,7 @@
                          Compare @\farg{comp}@);
 
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void nth_element(Iter @\farg{first}@, Iter @\farg{nth}@,
                      Iter @\farg{last}@);
@@ -517,7 +535,7 @@
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
     requires @\removedCCC{SameType<Iter::value_type\&, Iter::reference> \&\& Swappable<Iter::value_type> \&\&}@
              @\removedCCC{MoveConstructible<Iter::value_type> \&\& MoveAssignable<Iter::value_type>}@
- @\addedCC{HasSwap<Iter::reference, Iter::reference>}@
+ @\addedCC{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void nth_element(Iter @\farg{first}@, Iter @\farg{nth}@,
                      Iter @\farg{last}@, Compare @\farg{comp}@);
@@ -592,14 +610,14 @@
                   OutIter @\farg{result}@, Compare @\farg{comp}@);
 
   template<BidirectionalIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void inplace_merge(Iter @\farg{first}@,
                        Iter @\farg{middle}@,
                        Iter @\farg{last}@);
   template<BidirectionalIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void inplace_merge(Iter @\farg{first}@,
                        Iter @\farg{middle}@,
@@ -735,45 +753,45 @@
 
   @\textcolor{black}{// \ref{alg.heap.operations}, heap operations:}@
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void push_heap(Iter @\farg{first}@, Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void push_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                    Compare @\farg{comp}@);
 
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void pop_heap(Iter @\farg{first}@, Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void pop_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                   Compare @\farg{comp}@);
 
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void make_heap(Iter @\farg{first}@, Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void make_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                    Compare @\farg{comp}@);
 
   template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           && LessThanComparable<Iter::value_type>
     void sort_heap(Iter @\farg{first}@, Iter @\farg{last}@);
   template<RandomAccessIterator Iter,
            @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
           @\addedCC{\&\& CopyConstructible<Compare>}@
     void sort_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                    Compare @\farg{comp}@);
@@ -1269,7 +1287,7 @@
 if no such iterator is found.
 
 \pnum
-\complexity\
+\resetcolor{}\complexity\
 For a nonempty range, exactly
 \tcode{min((i - \farg{first}) + 1, (\farg{last}\ - \farg{first}) - 1)}\
 applications of the corresponding predicate, where \tcode{i}\ is
@@ -1367,7 +1385,7 @@
              Iter2 @\farg{first2}@);
 
 template<InputIterator Iter1, InputIterator Iter2,
- Predicate<auto, Iter1::@\changedCCC{reference}{value_type}@, Iter2::@\changedCCC{reference}{value_type}@> Pred>
+ @\resetcolor{}@Predicate<auto, Iter1::@\changedCCC{reference}{value_type}@, Iter2::@\changedCCC{reference}{value_type}@> Pred>
   @\addedCC{requires CopyConstructible<Pred>}@
   bool equal(Iter1 @\farg{first1}@, Iter1 @\farg{last1}@,
              Iter2 @\farg{first2}@, Pred @\farg{pred}@);
@@ -1581,7 +1599,9 @@
 \index{move\tcode{move}}%
 \color{addclr}
 \begin{itemdecl}
-@\textcolor{addclr}{}@template<InputIterator InIter, OutputIterator<auto, InIter::value_type&&> OutIter>
+template<InputIterator InIter, @\changedCCC{OutputIterator<auto, InIter::value_type\&\&>}{typename}@ OutIter>
+ @\addedCC{requires Movable<InIter::reference>}@
+ @\addedCC{\&\& OutputIterator<OutIter, Movable<InIter::reference>::result_type>}@
   OutIter move(InIter first, InIter last,
                OutIter result);
 \end{itemdecl}
@@ -1622,8 +1642,9 @@
 \color{addclr}
 \begin{itemdecl}
 template<BidirectionalIterator InIter, BidirectionalIterator OutIter>
-
- requires @\changedCCC{HasMoveAssign}{OutputIterator}@<OutIter@\removedCCC{::reference}@, InIter::value_type@\addedCC{\&\&}@>
+ requires @\removedCCC{HasMoveAssign<OutIter::reference, InIter::value_type>}@
+ @\addedCC{Movable<InIter::reference>}@
+ @\addedCC{\&\& OutputIterator<OutIter, Movable<InIter::reference>::result_type>}@
   OutIter move_backward(InIter first, InIter last,
                         OutIter result);
 \end{itemdecl}
@@ -1672,7 +1693,7 @@
 \color{addclr}
 \begin{itemdecl}
 template<class T>
- requires MoveAssignable<T> && MoveConstructible<T> @\addedCC{\&\& HasDestructor<T>}@
+ requires MoveAssignable<T> && MoveConstructible<T> @\addedCC{\&\& NothrowDestructible<T>}@
   void swap(T& @\farg{a}@, T& @\farg{b}@);
 \end{itemdecl}
 \color{black}
@@ -1766,14 +1787,16 @@
 \index{transform@\tcode{transform}}%
 \color{addclr}\begin{itemdecl}
 template<InputIterator InIter, class OutIter,
- Callable<auto, InIter::reference> Op>
+ Callable<auto, @\changedCCC{InIter::reference}{const InIter::value_type\&}@> Op>
   requires OutputIterator<OutIter, Op::result_type>
         @\addedCC{\&\& CopyConstructible<Op>}@
   OutIter transform(InIter @\farg{first}@, InIter @\farg{last}@,
                     OutIter @\farg{result}@, Op @\farg{op}@);
 
 template<InputIterator InIter1, InputIterator InIter2,
- class OutIter, Callable<auto, InIter1::reference, InIter2::reference> BinaryOp>
+ class OutIter,
+ Callable<auto, @\changedCCC{InIter1::reference}{const InIter1::value_type\&}@,
+ @\changedCCC{InIter2::reference}{const InIter2::value_type\&}@> BinaryOp>
   requires OutputIterator<OutIter, BinaryOp::result_type>
         @\addedCC{\&\& CopyConstructible<BinaryOp>}@
   OutIter transform(InIter1 @\farg{first1}@, InIter1 @\farg{last1}@,
@@ -1785,8 +1808,8 @@
   \tcode{Callable} arguments should be \tcode{reference}s or
   \tcode{const value_type\&}s. The text says that the function object
   shall not modify elements (which implies \tcode{const
- value_type\&}), but existing practice is uses
- \tcode{reference}. We leave this as \tcode{reference} for now.}
+ value_type\&}), and in other areas we have consistently used
+ reference-to-const, e.g., for predicates.}
 
 \begin{itemdescr}
 \pnum
@@ -2031,7 +2054,8 @@
 \index{remove_if@\tcode{remove_if}}%
 \color{addclr}\begin{itemdecl}
 template<ForwardIterator Iter, class T>
- requires @\changedCCC{MoveAssignable}{OutputIterator}@<@\addedCC{Iter, }@Iter::reference> && HasEqualTo<Iter::@\changedCCC{reference}{value_type}@, T>
+ requires @\changedCCC{MoveAssignable}{OutputIterator}@<@\addedCC{Iter, }@Iter::reference>
+ && HasEqualTo<Iter::@\changedCCC{reference}{value_type}@, T>
   Iter remove(Iter @\farg{first}@, Iter @\farg{last}@,
               const T& @\farg{value}@);
 
@@ -2217,12 +2241,10 @@
 \end{itemdecl}
 \color{black}
 
-\editorial{We assume (and require!) the proposed resolution to DR 538,
- which adds the \tcode{Has\removedCCC{Copy}Assign} requirement.}
-
 \editorial{Note that we have split the two signatures of
   \tcode{unique_copy} into six signatures, to cover the actual
- variants required in the implementation.}
+ variants required in the implementation and specify how partial
+ ordering would occur.}
 
 \begin{itemdescr}
 \pnum
@@ -2536,7 +2558,7 @@
 \index{stable_partition@\tcode{stable_partition}}%
 \color{addclr}\begin{itemdecl}
 template<BidirectionalIterator Iter, Predicate<auto@\addedCC{,}@ Iter::@\changedCCC{reference}{value_type}@> Pred>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Pred>}@
   Iter stable_partition(Iter @\farg{first}@, Iter @\farg{last}@, Pred @\farg{pred}@);
 \end{itemdecl}\color{black}
@@ -2593,13 +2615,13 @@
 \index{sort@\tcode{sort}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         && LessThanComparable<Iter::value_type>
   void sort(Iter @\farg{first}@, Iter @\farg{last}@);
 
 template<RandomAccessIterator Iter,
           @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void sort(Iter @\farg{first}@, Iter @\farg{last}@,
             Compare @\farg{comp}@);
@@ -2638,13 +2660,13 @@
 \index{stable_sort@\tcode{stable_sort}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         && LessThanComparable<Iter::value_type>
   void stable_sort(Iter @\farg{first}@, Iter @\farg{last}@);
 
 template<RandomAccessIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void stable_sort(Iter @\farg{first}@, Iter @\farg{last}@,
                    Compare @\farg{comp}@);
@@ -2682,14 +2704,14 @@
 \index{partial_sort@\tcode{partial_sort}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         && LessThanComparable<Iter::value_type>
   void partial_sort(Iter @\farg{first}@,
                     Iter @\farg{middle}@,
                     Iter @\farg{last}@);
 template<RandomAccessIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void partial_sort(Iter @\farg{first}@,
                     Iter @\farg{middle}@,
@@ -2843,7 +2865,7 @@
 \index{nth_element@\tcode{nth_element}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         && LessThanComparable<Iter::value_type>
   void nth_element(Iter @\farg{first}@, Iter @\farg{nth}@,
                    Iter @\farg{last}@);
@@ -2852,7 +2874,7 @@
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
   requires @\removedCCC{SameType<Iter::value_type\&, Iter::reference> \&\& Swappable<Iter::value_type> \&\&}@
            @\removedCCC{MoveConstructible<Iter::value_type> \&\& MoveAssignable<Iter::value_type>}@
- @\addedCC{HasSwap<Iter::reference, Iter::reference>}@
+ @\addedCC{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void nth_element(Iter @\farg{first}@, Iter @\farg{nth}@,
                    Iter @\farg{last}@, Compare @\farg{comp}@);
@@ -3208,7 +3230,7 @@
 \index{inplace_merge@\tcode{inplace_merge}}%
 \color{addclr}\begin{itemdecl}
 template<BidirectionalIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         && LessThanComparable<Iter::value_type>
   void inplace_merge(Iter @\farg{first}@,
                      Iter @\farg{middle}@,
@@ -3216,7 +3238,7 @@
 
 template<BidirectionalIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void inplace_merge(Iter @\farg{first}@,
                      Iter @\farg{middle}@,
@@ -3633,13 +3655,13 @@
 \index{push_heap@\tcode{push_heap}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         && LessThanComparable<Iter::value_type>
   void push_heap(Iter @\farg{first}@, Iter @\farg{last}@);
 
 template<RandomAccessIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void push_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                  Compare @\farg{comp}@);
@@ -3676,12 +3698,12 @@
 \index{pop_heap@\tcode{pop_heap}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@ && LessThanComparable<Iter::value_type>
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@ && LessThanComparable<Iter::value_type>
   void pop_heap(Iter @\farg{first}@, Iter @\farg{last}@);
 
 template<RandomAccessIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void pop_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                 Compare @\farg{comp}@);
@@ -3722,13 +3744,13 @@
 \index{make_heap@\tcode{make_heap}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@ &&
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@ &&
            LessThanComparable<Iter::value_type>
   void make_heap(Iter @\farg{first}@, Iter @\farg{last}@);
 
 template<RandomAccessIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void make_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                  Compare @\farg{comp}@);
@@ -3759,12 +3781,12 @@
 \index{sort_heap@\tcode{sort_heap}}%
 \color{addclr}\begin{itemdecl}
 template<RandomAccessIterator Iter>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@ && LessThanComparable<Iter::value_type>
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@ && LessThanComparable<Iter::value_type>
   void sort_heap(Iter @\farg{first}@, Iter @\farg{last}@);
 
 template<RandomAccessIterator Iter,
          @\changedCCC{Predicate}{StrictWeakOrder}@<auto, Iter::value_type@\removedCCC{, Iter::value_type}@> Compare>
- requires @\changedCCC{SwappableIterator<Iter>}{HasSwap<Iter::reference, Iter::reference>}@
+ requires @\changedCCC{SwappableIterator<Iter>}{MovableIterator<Iter>}@
         @\addedCC{\&\& CopyConstructible<Compare>}@
   void sort_heap(Iter @\farg{first}@, Iter @\farg{last}@,
                  Compare @\farg{comp}@);

Modified: sandbox/committee/concepts/stdlib/lib-issues.txt
==============================================================================
--- sandbox/committee/concepts/stdlib/lib-issues.txt (original)
+++ sandbox/committee/concepts/stdlib/lib-issues.txt 2008-06-28 22:02:46 EDT (Sat, 28 Jun 2008)
@@ -32,14 +32,14 @@
 y - stable_partition, stable_sort, partial_sort requirements not sufficient for efficient implementation. See reference to extra memory.
      Possible need to retain second line of removed requirements.
 
-y - Check for need of NoThrowDestructible
+Y - Check for need of NoThrowDestructible
 
 
 25.2.10/3
 Y - s/InIter::value_type/InIter::reference/
 
 25.2.11
-y - Do rotate requirements provide enough latitude to allow todays optimizations based on iterator categories.
+N - Do rotate requirements provide enough latitude to allow todays optimizations based on iterator categories.
 N - Is requiring Swappable overconstraining the implementation? I.e. there are algorithms that do not require a swap function.
      (Doug's reply: we agreed on the -lib reflector to have MoveConstructible+MoveAssignable+Swappable requirements for most algorithms, to give implementors more lattitude.)
 
@@ -51,7 +51,7 @@
     (Doug's reply: we need concepts for the new random numbers library before we can add concept requirements here).
 
 25.2.12/4
-y - Why was the specification for rand's semantics removed. I.e. returns random number in the range (0,n]
+Y - Why was the specification for rand's semantics removed. I.e. returns random number in the range (0,n]
 
 25.2.13
 Y - Typo stable_partion declaration s/Predicate<auto Iter::reference>/Predicate<auto, Iter::reference>/
@@ -71,11 +71,7 @@
 
 Y - s/Iter::value_type/Iter::reference/g
     (Doug: this only applies to the HasCopyAssign, which will actually be a HasAssign)
- - Do we need HasLess 1 & 2 ? gcc does not have 2
- (Doug: I'm undecided; do implementors need this freedom? In
- reality, we might just want to force the value_types to be the
- same. This routine is insane without that requirement.)
- (Mat: in that case, is it worth rasing the bar to LessThanComparable?)
+N - Do we need HasLess 1 & 2 ? gcc does not have 2
 N - partial_sort_copy single parameter HasLess requirement to be replaced with LessThanComparable concept.
 N - Add Requirements clause:
      *in < *res == RAIter::reference(*in) < *res
@@ -99,7 +95,7 @@
   (Doug: not sure what this means. Do we still need to say something?)
 
 
-- Merge et al: SameType requirement is wrong! Switch to heterogeneous
+Y - Merge et al: SameType requirement is wrong! Switch to heterogeneous
   HasLess.
 
 ===================================================================
@@ -107,19 +103,19 @@
 
 In general
 
-y - s/Iter::value_type/Iter::reference/g clear up value reference issue. Proxy iterators and such
+Y - s/Iter::value_type/Iter::reference/g clear up value reference issue. Proxy iterators and such
 
-y - Do we always need semantic concepts in the function declaration.
+Y - Do we always need semantic concepts in the function declaration.
   (Doug: Where the semantics make sense, yes)
 
-y - Add new concept StrictWeakOrdering (refines binary Predicate) and use it where Compare needs to provide
+Y - Add new concept StrictWeakOrdering (refines binary Predicate) and use it where Compare needs to provide
   strict weak ordering. E.g. sort. (Key of LessThanComparable)
 
-y - Whereever we find MutableIter it's probably wrong.
+Y - Whereever we find MutableIter it's probably wrong.
 
 Y - Make sure Predicate takes value_type const&. See InputIterator value_type convertability requirements. Same is true for every use of value_type in concepts. Note that LessThanComparable already adds it.
 
-- Do we want to bundle MoveConstructible MoveAssingable Swappable. Howard prefers not to.
+Y - Do we want to bundle MoveConstructible MoveAssingable Swappable. Howard prefers not to.
 
 25.3.1.5
 
@@ -135,7 +131,7 @@
 25.3.6.1
 25.3.6.3
 
-- Working draft does not require Swappable why do we require this? Alan reports Bill + Pete do say it's a defect in the standard.
+Y - Working draft does not require Swappable why do we require this? Alan reports Bill + Pete do say it's a defect in the standard.
 
 25.3.6.5
 


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