Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-04-02 21:08:36


Author: dgregor
Date: 2008-04-02 21:08:36 EDT (Wed, 02 Apr 2008)
New Revision: 44006
URL: http://svn.boost.org/trac/boost/changeset/44006

Log:
Clarify behavior of member templates
Text files modified:
   sandbox/committee/concepts/wording/local.bib | 19 +++++++++++++++++++
   sandbox/committee/concepts/wording/wording.tex | 36 +++++++++++++++++++++++++-----------
   2 files changed, 44 insertions(+), 11 deletions(-)

Modified: sandbox/committee/concepts/wording/local.bib
==============================================================================
--- sandbox/committee/concepts/wording/local.bib (original)
+++ sandbox/committee/concepts/wording/local.bib 2008-04-02 21:08:36 EDT (Wed, 02 Apr 2008)
@@ -394,3 +394,22 @@
  address = {New York, NY, USA},
  }
 
+@TechReport{GregorStroustrup07:concepts_wording_rev_5,
+ author = {Douglas Gregor and Bjarne Stroustrup and Jeremy Siek and James Widman},
+ title = {Proposed Wording for Concepts (Revision 5)},
+ institution = {ISO/IEC JTC 1, Information Technology, Subcommittee
+ SC 22, Programming Language {C++}},
+ year = 2008,
+ number = {N2571=08-0081},
+ month = {March}
+}
+
+@TechReport{gregor08:soundness,
+ author = {Douglas Gregor},
+ title = {Type-Soundness and Optimization in the Concepts Proposal},
+ institution = {ISO/IEC JTC 1, Information Technology, Subcommittee
+ SC 22, Programming Language {C++}},
+ year = 2008,
+ number = {N2576=08-0086},
+ month = {March}}
+

Modified: sandbox/committee/concepts/wording/wording.tex
==============================================================================
--- sandbox/committee/concepts/wording/wording.tex (original)
+++ sandbox/committee/concepts/wording/wording.tex 2008-04-02 21:08:36 EDT (Wed, 02 Apr 2008)
@@ -44,6 +44,7 @@
 Jeremy Siek, University of Colorado at Boulder \\
 James Widman, Gimpel Software
 \end{tabular}\vspace{-6pt}
+
 \par\noindent Document number: DRAFT \vspace{-6pt}
 \par\noindent Revises document number: N2501=08-0011 \vspace{-6pt}
 \par\noindent Date: \today\vspace{-6pt}
@@ -73,13 +74,16 @@
 \item Concepts for the C++0x Standard Library: Numerics~[\href{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2574.pdf}{N2574=08-0084}]
 \end{itemize}
 
-\section*{Non-Trivial Changes from N2501}
-The wording in this document reflects one major change from the
-formulation of concepts presented in N2501: the introduction of
-wording for the ``Eliminating Forwarding Functions'' extension
-described in section 4.3 of ``Type-Soundness and Optimization in the
-Concepts Proposal'', posted to the \Cpp{} Extensions reflector on
-February 22, 2008.
+\section*{Changes from N2501}
+\begin{itemize}
+\item Incorporate wording to description ``option \#2'', corresponding
+ to the ``Eliminate Forwarding Functions'' option described in
+ N2576~\cite{gregor08:soundness}.
+\item Clarified that member templates of constrained templates are
+ constrained templates (\ref{temp.mem}) but that the
+ templates are an unconstrained context (\ref{temp.constrained});
+ their bodies are constrained contexts.
+\end{itemize}
 
 \section*{Typographical conventions}
 Within the proposed wording, text that has been added
@@ -2222,7 +2226,13 @@
 \addedConcepts{\mbox{\exitexample}}
 \color{black}
 
-\setcounter{subsection}{2}
+\rSec2[temp.mem]{Member templates}
+
+\setcounter{Paras}{9}
+\pnum
+\addedCC{A member template of a constrained class template is itself a
+ constrained template (\mbox{\ref{temp.constrained}}).}
+
 \rSec2[temp.variadic]{Variadic templates}
 \pnum
 A \mbox{\techterm{template parameter pack}} is a template parameter
@@ -3844,7 +3854,7 @@
       The candidate set contains:}
     \begin{itemize}
     \item \addedCC{the template from which the seed was instantiated, if the
- seed is a template function,}
+ seed is a function template specialization,}
     \item \addedCC{every function template that has the same name and is
       declared in the same namespace as the seed, and}
     \item \addedCC{every non-template function that is consistent with
@@ -4515,9 +4525,13 @@
   \additemConcepts{a late-checked block (\mbox{\ref{stmt.late}}) indicates a
     compound statement that is an unconstrained context,}
   \additemConcepts{a default template argument in a
- \mbox{\techterm{template-parameter}} is an unconstrained context,
- and}
+ \mbox{\techterm{template-parameter}} is an unconstrained context,}
   \additemConcepts{a default argument in a \mbox{\techterm{parameter-declaration}}.}
+ \additemCC{the \mbox{\techterm{requires-clause}}, \mbox{\techterm{type-specifier}}, and \mbox{\techterm{declarator}} of a constrained member (\mbox{\ref{class.mem}}) are unconstrained contexts, and}
+ \additemCC{a member template of a constrained template is an
+ unconstrained context (\mbox{\ref{temp.mem}}). \mbox{\enternote}
+ The member template itself will still be a constrained template,
+ and its body will be a constrained context. \mbox{\exitnote}}
 \end{itemize}
 
 \rSec2[temp.req]{Template requirements}


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