Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48735 - in sandbox/committee/concepts: issues/issues stdlib
From: dgregor_at_[hidden]
Date: 2008-09-11 10:29:16


Author: dgregor
Date: 2008-09-11 10:29:15 EDT (Thu, 11 Sep 2008)
New Revision: 48735
URL: http://svn.boost.org/trac/boost/changeset/48735

Log:
Add PolymorphicClass, fix NonTypeTemplateParameterType
Text files modified:
   sandbox/committee/concepts/issues/issues/issue27.xml | 2 +-
   sandbox/committee/concepts/stdlib/clib-concepts.tex | 27 +++++++++++++++++++++++----
   2 files changed, 24 insertions(+), 5 deletions(-)

Modified: sandbox/committee/concepts/issues/issues/issue27.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue27.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue27.xml 2008-09-11 10:29:15 EDT (Thu, 11 Sep 2008)
@@ -3,7 +3,7 @@
   <!ENTITY nbsp "&#160;">
 ] >
 
-<issue num="27" status="New">
+<issue num="27" status="WP">
 <title>Missing core concept for polymorphic types</title>
 <section><sref ref="[concept.support]"/></section>
 <submitter>Alisdair Meredith</submitter>

Modified: sandbox/committee/concepts/stdlib/clib-concepts.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-concepts.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-concepts.tex 2008-09-11 10:29:15 EDT (Thu, 11 Sep 2008)
@@ -147,9 +147,12 @@
     \end{itemize}
   \item Added \tcode{ValueType} concept; see c++std-lib-22195. The
     concepts \tcode{Union}, \tcode{TrivialType},
- \tcode{StandardLayoutType}, \tcode{LiteralType}, and
- \tcode{NonTypeTemplateParameterType} all refine this new concept.
+ \tcode{StandardLayoutType}, and \tcode{LiteralType} all refine
+ this new concept.
   \item \tcode{VariableType} refines \tcode{ReferentType}.
+ \item Added the \tcode{PolymorphicClass} concept (concepts issue
+ \#27), which refines \tcode{Class} and is further refined by
+ \tcode{HasVirtualDestructor}.
   \end{itemize}
 
 \end{titlepage}
@@ -244,6 +247,7 @@
   concept ValueType<typename T> @\textit{see below}@;
   concept ClassType<typename T> @\textit{see below}@;
   concept Class<typename T> @\textit{see below}@;
+ concept PolymorphicClass<typename T> @\textit{see below}@;
   concept Union<typename T> @\textit{see below}@;
   concept TrivialType<typename T> @\textit{see below}@;
   concept StandardLayoutType<typename T> @\textit{see below}@;
@@ -542,6 +546,21 @@
 \end{itemdescr}
 
 \begin{itemdecl}
+concept PolymorphicClass<typename T> : Class<T> { }
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\addedConcepts{\mbox{\reallynote} describes polymorphic class types (\mbox{\ref{class.virtual}}).}
+
+\pnum
+\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
+ is a polymorphic class, a concept map
+ \mbox{\tcode{PolymorphicClass<T>}} shall be implicitly defined in namespace
+ \mbox{\tcode{std}}.}
+\end{itemdescr}
+
+\begin{itemdecl}
 concept Union<typename T> : ClassType<T>, ValueType<T> { }
 \end{itemdecl}
 
@@ -628,7 +647,7 @@
 \end{itemdescr}
 
 \begin{itemdecl}
-concept NonTypeTemplateParameterType<typename T> : ValueType<T> { }
+concept NonTypeTemplateParameterType<typename T> : VariableType<T> { }
 \end{itemdecl}
 
 \begin{itemdescr}
@@ -1536,7 +1555,7 @@
 \end{itemdescr}
 
 \begin{itemdecl}
-concept HasVirtualDestructor<typename T> : HasDestructor<T> { }
+concept HasVirtualDestructor<typename T> : HasDestructor<T>, PolymorphicClass<T> { }
 \end{itemdecl}
 
 \begin{itemdescr}


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