Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48757 - sandbox/committee/concepts/stdlib
From: dgregor_at_[hidden]
Date: 2008-09-12 15:35:24


Author: dgregor
Date: 2008-09-12 15:35:23 EDT (Fri, 12 Sep 2008)
New Revision: 48757
URL: http://svn.boost.org/trac/boost/changeset/48757

Log:
Fix pair and tuple constructors
Text files modified:
   sandbox/committee/concepts/stdlib/clib-utilities.tex | 42 ++++++++++++++++++++-------------------
   1 files changed, 22 insertions(+), 20 deletions(-)

Modified: sandbox/committee/concepts/stdlib/clib-utilities.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-utilities.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-utilities.tex 2008-09-12 15:35:23 EDT (Fri, 12 Sep 2008)
@@ -76,6 +76,8 @@
 \item Applied the resolution of library issue 769.
 \item Added missing \tcode{Convertible} constraints to
   \tcode{HasBitAnd}, \tcode{HasBitOr}, \tcode{HasBitXor}.
+\item Fixed the requirements of some \tcode{pair} and \tcode{tuple}
+ constructors, mainly for consistent use of \tcode{RvalueOf}.
 \end{itemize}
 
 \end{titlepage}
@@ -350,10 +352,10 @@
     pair(U&& @\farg{x}@, V&& @\farg{y}@);
   @\removedConcepts{pair(pair\&\& \mbox{\farg{p}});}@
   template<class @\farg{U}@, class @\farg{V}@>
- @\addedConcepts{requires Constructible<T1, U> \&\& Constructible<T2, V>}@
+ @\addedConcepts{requires Constructible<T1, const U\&> \&\& Constructible<T2, const V\&>}@
     pair(const pair<@\farg{U}@, @\farg{V}@>& @\farg{p}@);
   template<class @\farg{U}@, class @\farg{V}@>
- @\addedConcepts{requires Constructible<T1, U\&\&> \&\& Constructible<T2, V\&\&>}@
+ @\addedConcepts{requires Constructible<T1, RvalueOf<U>::type> \&\& Constructible<T2, RvalueOf<V>::type>}@
     pair(pair<@\farg{U}@, @\farg{V}@>&& @\farg{p}@);
   template<class @\farg{U}@, class... @\farg{Args}@>
     @\addedConcepts{requires Constructible<T1, U\&\&> \&\& Constructible<T2, Args\&\&...>}@
@@ -374,8 +376,8 @@
           @\addedConcepts{\&\& ConstructibleWithAllocator<T2, Alloc, const V\&>}@
     pair(allocator_arg_t, const Alloc& a, const pair<@\farg{U}@, @\farg{V}@>& @\farg{p}@);
   template<class @\farg{U}@, class @\farg{V}@, @\changedConcepts{class}{Allocator} Alloc@>
- @\addedConcepts{requires ConstructibleWithAllocator<T1, Alloc, U\&\&>}@
- @\addedConcepts{\&\& ConstructibleWithAllocator<T2, Alloc, V\&\&>}@
+ @\addedConcepts{requires ConstructibleWithAllocator<T1, Alloc, RvalueOf<U>::type>}@
+ @\addedConcepts{\&\& ConstructibleWithAllocator<T2, Alloc, RvalueOf<V>::type>}@
     pair(allocator_arg_t, const Alloc& a, pair<@\farg{U}@, @\farg{V}@>&& @\farg{p}@);
   template<class @\farg{U}@, class... @\farg{Args}@, @\changedConcepts{class}{Allocator} Alloc@>
     @\addedConcepts{requires ConstructibleWithAllocator<T1, Alloc, U\&\&>}@
@@ -475,7 +477,7 @@
 
 \begin{itemdecl}
 template<class @\farg{U}@, class @\farg{V}@>
- @\addedConcepts{requires Constructible<T1, U> \&\& Constructible<T2, V>}@
+ @\addedConcepts{requires Constructible<T1, const U\&> \&\& Constructible<T2, const V\&>}@
   pair(const pair<@\farg{U}@, @\farg{V}@> &@\farg{p}@);
 \end{itemdecl}
 
@@ -488,7 +490,7 @@
 
 \begin{itemdecl}
 template<class @\farg{U}@, class @\farg{V}@>
- @\addedConcepts{requires Constructible<T1, U\&\&> \&\& Constructible<T2, V\&\&>}@
+ @\addedConcepts{requires Constructible<T1, RvalueOf<U>::type> \&\& Constructible<T2, RvalueOf<V>::type>}@
   pair(pair<@\farg{U}@, @\farg{V}@>&& @\farg{p}@);
 \end{itemdecl}
 
@@ -562,7 +564,7 @@
 
 \begin{itemdecl}
 template<class @\farg{U}@, class @\farg{V}@, @\changedConcepts{class}{Allocator} Alloc@>
- @\addedConcepts{requires ConstructibleWithAllocator<T1, Alloc, U\&\&> \&\& ConstructibleWithAllocator<T2, Alloc, V\&\&>}@
+ @\addedConcepts{requires ConstructibleWithAllocator<T1, Alloc, RvalueOf<U> \&\& ConstructibleWithAllocator<T2, Alloc, RvalueOf<V>::type>}@
   pair(allocator_arg_t, const Alloc& a, pair<@\farg{U}@, @\farg{V}@>&& @\farg{p}@);
 \end{itemdecl}
 
@@ -857,17 +859,17 @@
   @\removedConcepts{tuple(tuple\&\&);}@
 
   template <class... UTypes>
- @\addedConcepts{requires Constructible<Types, UTypes>...}@
+ @\addedConcepts{requires Constructible<Types, const UTypes\&>...}@
     tuple(const tuple<UTypes...>&);
   template <class... UTypes>
- @\addedConcepts{requires Constructible<Types, UTypes\&\&>...}@
+ @\addedConcepts{requires Constructible<Types, RvalueOf<UTypes>::type>...}@
     tuple(tuple<UTypes...>&&);
 
   template <@\changedConcepts{class U1, class U2}{class... UTypes}@>
- @\addedConcepts{requires Constructible<Types, UTypes>...}@
+ @\addedConcepts{requires Constructible<Types, const UTypes\&>...}@
     tuple(const pair<@\changedConcepts{U1, U2}{UTypes...}@>&); @\removedConcepts{// iff \mbox{\tcode{sizeof...(Types) == 2}}}@
   template <@\changedConcepts{class U1, class U2}{class... UTypes}@>
- @\addedConcepts{requires Constructible<Types, UTypes\&\&>...}@
+ @\addedConcepts{requires Constructible<Types, RvalueOf<UTypes>::type>...}@
     tuple(pair<@\changedConcepts{U1, U2}{UTypes...}@>&&); @\removedConcepts{// iff \mbox{\tcode{sizeof...(Types) == 2}}}@
 
   // allocator-extended constructors
@@ -887,13 +889,13 @@
     @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, const UTypes\&>...}@
     tuple(allocator_arg_t, const Alloc& a, const tuple<UTypes...>&);
   template <@\changedConcepts{class}{Allocator}@ Alloc, class... UTypes>
- @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, UTypes\&\&>...}@
+ @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, RvalueOf<UTypes>::type>...}@
     tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&&);
   template <@\changedConcepts{class}{Allocator}@ Alloc, @\changedConcepts{class U1, class U2}{class... UTypes}@>
     @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, const UTypes\&>...}@
     tuple(allocator_arg_t, const Alloc& a, const pair<@\changedConcepts{U1, U2}{UTypes...}@>&);
   template <@\changedConcepts{class}{Allocator}@ Alloc, @\changedConcepts{class U1, class U2}{class... UTypes}@>
- @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, UTypes\&\&>...}@
+ @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, RvalueOf<UTypes>::type>...}@
     tuple(allocator_arg_t, const Alloc& a, pair<@\changedConcepts{U1, U2}{UTypes...}@>&&);
 
   @\addedConcepts{requires CopyAssignable<Types>...}@ tuple& operator=(const tuple&);
@@ -1005,8 +1007,8 @@
 \index{tuple@\tcode{tuple}!tuple@\tcode{tuple}}%
 \begin{itemdecl}
 template <@\addedD{class... UTypes}@>
- @\addedConcepts{requires Constructible<Types, UTypes>...}@
- tuple(const tuple<@\addedD{UTypes...}@>& u);
+ @\addedConcepts{requires Constructible<Types, const UTypes\&>...}@
+ tuple(const tuple<UTypes...>& u);
 \end{itemdecl}
 
 \begin{itemdescr}
@@ -1031,7 +1033,7 @@
 \index{tuple@\tcode{tuple}!tuple@\tcode{tuple}}%
 \begin{itemdecl}
 template <class... UTypes>
- @\addedConcepts{requires Constructible<Types, UTypes\&\&>...}@
+ @\addedConcepts{requires Constructible<Types, RvalueOf<UTypes>::type>...}@
   tuple(tuple<UTypes...>&& u);
 \end{itemdecl}
 
@@ -1055,7 +1057,7 @@
 \index{pair@\tcode{pair}}%
 \begin{itemdecl}
 template <@\changedConcepts{class U1, class U2}{class... UTypes}@>
- @\addedConcepts{requires Constructible<Types, UTypes>...}@
+ @\addedConcepts{requires Constructible<Types, const UTypes\&>...}@
   tuple(const pair<@\changedConcepts{U1, U2}{UTypes...}@>&);
 \end{itemdecl}
 
@@ -1076,7 +1078,7 @@
 \index{pair@\tcode{pair}}%
 \begin{itemdecl}
 template <@\changedConcepts{class U1, class U2}{class... UTypes}@>
- @\addedConcepts{requires Constructible<Types, UTypes\&\&>...}@
+ @\addedConcepts{requires Constructible<Types, RvalueOf<UTypes>::type>...}@
   tuple(pair<@\changedConcepts{U1, U2}{UTypes...}@>&&);
 \end{itemdecl}
 
@@ -1259,13 +1261,13 @@
   @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, const UTypes\&>...}@
   tuple(allocator_arg_t, const Alloc& a, const tuple<UTypes...>&);
 template <@\changedConcepts{class}{Allocator}@ Alloc, class... UTypes>
- @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, UTypes\&\&>...}@
+ @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, RvalueOf<UTypes>::type>...}@
   tuple(allocator_arg_t, const Alloc& a, tuple<UTypes...>&&);
 template <@\changedConcepts{class}{Allocator}@ Alloc, @\changedConcepts{class U1, class U2}{class... UTypes}@>
   @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, const UTypes\&>...}@
   tuple(allocator_arg_t, const Alloc& a, const pair<@\changedConcepts{U1, U2}{UTypes...}@>&);
 template <@\changedConcepts{class}{Allocator}@ Alloc, @\changedConcepts{class U1, class U2}{class... UTypes}@>
- @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, UTypes\&\&>...}@
+ @\addedConcepts{requires ConstructibleWithAllocator<Types, Alloc, RvalueOf<UTypes>::type>...}@
   tuple(allocator_arg_t, const Alloc& a, pair<@\changedConcepts{U1, U2}{UTypes...}@>&&);
 \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