Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-08-24 21:03:09


Author: dgregor
Date: 2008-08-24 21:03:08 EDT (Sun, 24 Aug 2008)
New Revision: 48359
URL: http://svn.boost.org/trac/boost/changeset/48359

Log:
Add FunctionType concept
Text files modified:
   sandbox/committee/concepts/stdlib/clib-concepts.tex | 16 +++++++++++++++-
   sandbox/committee/concepts/stdlib/clib-utilities.tex | 4 ++--
   sandbox/committee/concepts/wording/wording.tex | 2 ++
   3 files changed, 19 insertions(+), 3 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-08-24 21:03:08 EDT (Sun, 24 Aug 2008)
@@ -141,6 +141,8 @@
   \tcode{HasGreater}, \tcode{HasLessEqual}, and
   \tcode{HasGreaterEqual} ensure a total order. This is how concepts
   resolve issue 532 (already closed as NAD).
+
+\item Added the \tcode{FunctionType} concept.
 \end{itemize}
 
 \end{titlepage}
@@ -231,6 +233,7 @@
   concept ReferentType<typename T> { }
   concept VariableType<typename T> { }
   concept ObjectType<typename T> @\textit{see below}@;
+ concept FunctionType<typename T> @\textit{see below}@;
   concept ClassType<typename T> @\textit{see below}@;
   concept Class<typename T> @\textit{see below}@;
   concept Union<typename T> @\textit{see below}@;
@@ -460,7 +463,7 @@
 
 \begin{itemdescr}
 \pnum
-\addedConcepts{\mbox{\reallynote} describes object types ([basic.types]),
+\addedConcepts{\mbox{\reallynote} describes object types (\mbox{\ref{basic.types}}),
   for which storage can be allocated.}
 
 \pnum
@@ -470,6 +473,17 @@
   namespace \mbox{\tcode{std}}.}
 \end{itemdescr}
 
+\begin{itemdecl}
+concept FunctionType<typename T> : PointeeType<T> { }
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\addedConcepts{\mbox{\reallynote} describes function types (\mbox{\ref{dcl.fct}}).}
+
+\pnum
+\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that is a function type, a concept map \mbox{\tcode{FunctionType<T>}} shall be implicitly defined in namespace \mbox{\tcode{std}}.}
+\end{itemdescr}
 
 \begin{itemdecl}
 concept ClassType<typename T> : ObjectType<T> { }

Modified: sandbox/committee/concepts/stdlib/clib-utilities.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-utilities.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-utilities.tex 2008-08-24 21:03:08 EDT (Sun, 24 Aug 2008)
@@ -1730,7 +1730,7 @@
   // \marktr{}\ref{func.wrap} polymorphic function wrappers:
   class bad_function_call;
 
- template<class@\removedD{ Function}@> class function; // \addedD{undefined}
+ template<@\changedConcepts{class}{FunctionType}\removedD{ Function}@> class function; // \addedD{undefined}
   @\addedD{template<\changedConcepts{class}{Returnable} R, \changedConcepts{class}{CopyConstructible}... ArgTypes>}@
     class function<R(ArgTypes...)>;
 
@@ -2566,7 +2566,7 @@
 
 \begin{codeblock}
 namespace std {
- template<class@\removedD{ Function}@> class function; // \addedD{undefined}
+ template<@\changedConcepts{class}{FunctionType}\removedD{ Function}@> class function; // \addedD{undefined}
 
   @\addedD{template<\changedConcepts{class}{Returnable} R, \changedConcepts{class}{CopyConstructible}... ArgTypes>}@
   class function@\addedD{<R(ArgTypes...)>}@

Modified: sandbox/committee/concepts/wording/wording.tex
==============================================================================
--- sandbox/committee/concepts/wording/wording.tex (original)
+++ sandbox/committee/concepts/wording/wording.tex 2008-08-24 21:03:08 EDT (Sun, 24 Aug 2008)
@@ -5868,6 +5868,8 @@
 \begin{itemize}
 \additemConcepts{an object type ([intro.object]), if the template
   contains the requirement \mbox{\tcode{std::ObjectType<T>}},}
+\additemCC{a function type (\mbox{\ref{dcl.fct}}), if the template
+ contains the requirement \mbox{\tcode{std::FunctionType<T>}},}
 \additemConcepts{a class type (clause~\mbox{\ref{class}}), if the
   template contains the requirement
   \mbox{\tcode{std::ClassType<T>}},}


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