|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48875 - sandbox/committee/concepts/stdlib
From: dgregor_at_[hidden]
Date: 2008-09-19 03:51:13
Author: dgregor
Date: 2008-09-19 03:51:13 EDT (Fri, 19 Sep 2008)
New Revision: 48875
URL: http://svn.boost.org/trac/boost/changeset/48875
Log:
Finish off foundational concepts
Text files modified:
sandbox/committee/concepts/stdlib/clib-concepts.tex | 415 ---------------------------------------
1 files changed, 1 insertions(+), 414 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-09-19 03:51:13 EDT (Fri, 19 Sep 2008)
@@ -153,6 +153,7 @@
\item Added the \tcode{PolymorphicClass} concept (concepts issue
\#27), which refines \tcode{Class} and is further refined by
\tcode{HasVirtualDestructor}.
+ \item Moved the support concepts over to the core language wording.
\end{itemize}
\end{titlepage}
@@ -236,32 +237,6 @@
\synopsis{Header \tcode{<concepts>}\ synopsis}
\begin{codeblock}
namespace std {
- // \ref{concept.support}, support concepts:
- concept Returnable<typename T> { }
- concept PointeeType<typename T> { }
- concept MemberPointeeType<typename T> { }
- concept ReferentType<typename T> { }
- concept VariableType<typename T> { }
- concept ObjectType<typename T> @\textit{see below}@;
- concept FunctionType<typename T> @\textit{see below}@;
- 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}@;
- concept LiteralType<typename T> @\textit{see below}@;
- concept ScalarType<typename T> @\textit{see below}@;
- concept ArithmeticType<typename T> @\textit{see below}@;
- concept NonTypeTemplateParameterType<typename T> @\textit{see below}@;
- concept IntegralConstantExpressionType<typename T> @\textit{see below}@;
- concept IntegralType<typename T> @\textit{see below}@;
- concept EnumerationType<typename T> @\textit{see below}@;
- concept FloatingPointType<typename T> @\textit{see below}@;
- concept SameType<typename T, typename U> { }
- concept DerivedFrom<typename Derived, typename Base> { }
-
// \ref{concept.transform}, type transformations:
auto concept IdentityOf<typename T> @\textit{see below}@;
auto concept RvalueOf<typename T> @\textit{see below}@;
@@ -367,394 +342,6 @@
}
\end{codeblock}
-\rSec2[concept.support]{Support concepts}
-\pnum
-\addedConcepts{The concepts in [concept.support] provide the ability to state
-template requirements for C++ type classifications ([basic.types]) and
-type relationships that cannot be expressed directly with concepts
-([concept]). Concept maps for these concepts are implicitly defined.
-A program shall not provide concept maps for any concept in
-[concept.support].}
-
-\begin{itemdecl}
-concept Returnable<typename T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} Describes types that can be used as the
- return type of a function.}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every}
-\addedConcepts{non-array}
-\addedConcepts{type \mbox{\tcode{T}} that is
- \mbox{\techterm{cv}} \mbox{\tcode{void}} or that meets the
- requirement \mbox{\tcode{MoveConstructible<T>}}
- (\mbox{\ref{concept.copymove}}) and is not an abstract class,
- the concept map
- \mbox{\tcode{Returnable<T>}} shall be implicitly defined in
- namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept PointeeType<typename T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote}
-describes types to which a pointer can be
-created.}
-
-\pnum
-\addedConcepts{\mbox{\requires}
-for every type \mbox{\tcode{T}} that is an object type,
- a function type that does not have cv-qualifiers, or \mbox{\techterm{cv}} \mbox{\tcode{void}}, a
- concept map \mbox{\tcode{PointeeType}} shall be implicitly defined
- in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept MemberPointeeType<typename T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote}
-describes types to which a pointer-to-member can be
-created.}
-
-\pnum
-\addedConcepts{\mbox{\requires}
-for every type \mbox{\tcode{T}} that is an object type or
- function type, a
- concept map \mbox{\tcode{MemberPointeeType}} shall be implicitly defined
- in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept ReferentType<typename T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\mbox{\reallynote}
-\addedConcepts{describes types to which a reference can be
-created, including reference types (since references to
- references can be formed during substitution of template
- arguments).}
-
-\pnum
-\mbox{\requires}
-for every type \mbox{\tcode{T}} that is an object type, a
- function type that does not have cv-qualifiers, or a reference type, a
- concept map \mbox{\tcode{ReferentType}} shall be implicitly defined
- in namespace \mbox{\tcode{std}}.
-\end{itemdescr}
-
-\begin{itemdecl}
-concept VariableType<typename T> : ReferentType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes types that can be used to
- declare a variable.}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is an object type or reference type, but not an abstract class, a concept map
- \mbox{\tcode{VariableType<T>}} shall be implicitly defined in
-namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept ObjectType<typename T> : ReferentType<T>, PointeeType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes object types (\mbox{\ref{basic.types}}),
- for which storage can be allocated.}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is an object type, a concept map
- \mbox{\tcode{ObjectType<T>}} shall be implicitly defined in
- namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept FunctionType<typename T> : MemberPointeeType<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 ValueType<typename T> : ObjectType<T>, VariableType<T>, MemberPointeeType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes value types, for which
- objects, variables, references, pointers, and pointers-to-members
- can be created.}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is an object type but not an abstract class, a concept map
- \mbox{\tcode{ValueType<T>}} shall be implicitly defined in namespace
- \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept ClassType<typename T> : ObjectType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes class types (i.e., unions,
- classes, and structs).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a class type ([class]), a concept map \mbox{\tcode{ClassType<T>}}
- shall be implicitly defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept Class<typename T> : ClassType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes classes and structs ([class]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a class or struct, a concept map
- \mbox{\tcode{Class<T>}} shall be implicitly defined in namespace
- \mbox{\tcode{std}}.}
-\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}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes union types ([class.union]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a union, a concept map \mbox{\tcode{Union<T>}}
- shall be implicitly defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept TrivialType<typename T> : ValueType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes trivial types ([basic.types]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a trivial type, a concept map \mbox{\tcode{TrivialType<T>}} shall
- be implicitly defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept StandardLayoutType<typename T> : ValueType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes standard-layout types ([basic.types]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a standard-layout type, a concept map
- \mbox{\tcode{StandardLayoutType<T>}} shall be implicitly defined in
-namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept LiteralType<typename T> : ValueType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes literal types ([basic.types]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a literal type, a concept map \mbox{\tcode{LiteralType<T>}} shall
- be implicitly defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept ScalarType<typename T>
- : TrivialType<T>, LiteralType<T>, StandardLayoutType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes scalar types ([basic.types]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is a scalar type, a concept map \mbox{\tcode{ScalarType<T>}} shall
- be implicitly defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept ArithmeticType<typename T> : ScalarType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes arithmetic types (\mbox{\ref{basic.fundamental}}).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is an arithmetic type, a concept map \mbox{\tcode{ArithmeticType<T>}} shall
- be implicitly defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept NonTypeTemplateParameterType<typename T> : VariableType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes type that can
-be used as the type of a non-type template parameter ([temp.param]).}
-
-\pnum
-\addedConcepts{\mbox{\requires}
-for every type \mbox{\tcode{T}} that can be the type of a non-type
-\mbox{\techterm{template-parameter}} ([temp.param]), a concept map
-\mbox{\tcode{NonTypeTemplateParameterType<T>}} shall be implicitly defined in
-namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept IntegralConstantExpressionType<typename T>
- : ScalarType<T>, NonTypeTemplateParameterType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes types that
-can be the type of an integral constant expression ([expr.const]).}
-
-\pnum
-\addedConcepts{\mbox{\requires} for every type \mbox{\tcode{T}} that
- is an integral type or enumeration type, a concept map}\\
- \addedConcepts{\mbox{\tcode{IntegralConstantExpressionType<T>}} shall be implicitly
- defined in namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept IntegralType<typename T>
- : IntegralConstantExpressionType<T>, ArithmeticType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes integral types
-([basic.fundamental]).}
-
-\pnum
-\addedConcepts{\mbox{\requires}
-for every type \mbox{\tcode{T}} that is an integral type, a concept map
-\mbox{\tcode{IntegralType<T>}} shall be implicitly defined in
-namespace \mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept EnumerationType<typename T> : IntegralConstantExpressionType<T> {
- IntegralType underlying_type;
-}
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes enumeration types
-([dcl.enum]). \mbox{\tcode{underlying_type}} is the underlying type of
-the enumeration type.}
-
-\pnum
-\addedConcepts{\mbox{\requires}
-for every type \mbox{\tcode{T}} that is an enumeration type, a concept map
-\mbox{\tcode{EnumerationType<T>}} shall be implicitly defined in namespace
-\mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept FloatingPointType<typename T> : ArithmeticType<T> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes floating point types
-(\mbox{\ref{basic.fundamental}}).}
-
-\pnum
-\addedConcepts{\mbox{\requires}
-for every type \mbox{\tcode{T}} that is a floating point type, a concept map
-\mbox{\tcode{FloatingPointType<T>}} shall be implicitly defined in namespace
-\mbox{\tcode{std}}.}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept SameType<typename T, typename U> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\addedConcepts{\mbox{\reallynote} describes a same-type requirement
- ([temp.req]).}
-\end{itemdescr}
-
-\begin{itemdecl}
-concept DerivedFrom<typename Derived, typename Base> { }
-\end{itemdecl}
-
-\begin{itemdescr}
-\pnum
-\mbox{\requires}
-for every pair of class types (\mbox{\tcode{T}}, \mbox{\tcode{U}}),
-such that \mbox{\tcode{T}} is either the same as or publicly and
-unambiguously derived from \mbox{\tcode{U}}, a concept map
-\mbox{\tcode{DerivedFrom<T, U>}} shall be implicitly defined in namespace
-\mbox{\tcode{std}}.
-\end{itemdescr}
-
\rSec2[concept.transform]{Type transformations}
\pnum
\addedConcepts{The concepts in [concept.transform] provide simple type
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