|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2008-05-29 13:11:37
Author: dgregor
Date: 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
New Revision: 45915
URL: http://svn.boost.org/trac/boost/changeset/45915
Log:
Deal with several issues with the core library concepts
Added:
sandbox/committee/concepts/issues/issues/issue32.xml (contents, props changed)
sandbox/committee/concepts/issues/issues/issue33.xml (contents, props changed)
Text files modified:
sandbox/committee/concepts/issues/issues/concepts-issues.xml | 10 ++++++++
sandbox/committee/concepts/issues/issues/issue15.xml | 12 ++++++++++
sandbox/committee/concepts/issues/issues/issue31.xml | 8 ++++--
sandbox/committee/concepts/stdlib/clib-concepts.tex | 43 +++++++++++++++++++++------------------
sandbox/committee/concepts/stdlib/macros.tex | 10 +++-----
5 files changed, 52 insertions(+), 31 deletions(-)
Modified: sandbox/committee/concepts/issues/issues/concepts-issues.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/concepts-issues.xml (original)
+++ sandbox/committee/concepts/issues/issues/concepts-issues.xml 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -1,4 +1,4 @@
-<issueslist revision="C2"
+<issueslist revision="C4"
maintainer="Douglas Gregor <doug.gregor_at_[hidden]>"
active_docno="Dxxxx=xx-xxxx"
defect_docno="Dxxxx=xx-xxxx"
@@ -104,6 +104,14 @@
<revision_history>
+<revision tag="C4">
+Companion to the concepts proposals in the post-Antipolis mailing. (XX June 2008)
+</revision>
+
+<revision tag="C3">
+Companion to the concepts proposals in the pre-Sophia-Antipolis mailing. (19 May 2008)
+</revision>
+
<revision tag="C2">
Companion to the concepts proposals in the Post-Bellevue mailing. (25 Mar 2008)
</revision>
Modified: sandbox/committee/concepts/issues/issues/issue15.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue15.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue15.xml 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -3,7 +3,7 @@
<!ENTITY nbsp " ">
] >
-<issue num="15" status="New">
+<issue num="15" status="Review">
<title>Can <tt>Callable</tt>'s function object be an rvalue?</title>
<section><sref ref="[concept.operator]"/></section>
<submitter>LWG</submitter>
@@ -20,4 +20,14 @@
<p>Note: The function object cannot be an <tt>rvalue</tt>.</p>
</discussion>
+
+<resolution>
+ <p>Modify the definition of the <code>Callable</code> concept as follows:</p>
+ <pre>
+auto concept Callable<typename F, typename... Args> {
+ typename result_type;
+ result_type operator()(F&<ins>&</ins>, Args...);
+}
+ </pre>
+</resolution>
</issue>
Modified: sandbox/committee/concepts/issues/issues/issue31.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue31.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue31.xml 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -3,7 +3,7 @@
<!ENTITY nbsp " ">
] >
-<issue num="31" status="WP">
+<issue num="31" status="Review">
<title>Which specifiers are legal for associated functions?</title>
<section><sref ref="[concept.fct]"/></section>
<submitter>Daniel Kruegler</submitter>
@@ -21,8 +21,10 @@
associated functions (especially now that one can adapt the syntax
of member functions a concept map), so it should be
banned. Syntactically, a <i>pure-specifier</i> cannot occur in an
- associated function, so it need not be mentioned. Suggested
- change to [concept.fct]p2:</p>
+ associated function, so it need not be mentioned.
+ <code>constexpr</code> is permitted, as are any other specifiers
+ (like <code>explicit</code>) that aren't banned, so it doesn't need
+ to be mentioned either. Suggested change to [concept.fct]p2:</p>
<blockquote>
An <i>associated-function</i> shall declare a function or function
Added: sandbox/committee/concepts/issues/issues/issue32.xml
==============================================================================
--- (empty file)
+++ sandbox/committee/concepts/issues/issues/issue32.xml 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
+<!DOCTYPE issue SYSTEM "lwg-issue.dtd" [
+ <!ENTITY nbsp " ">
+] >
+
+<issue num="32" status="Review">
+<title>Missing definition of <code>TriviallyDefaultConstructible</code></title>
+<section><sref ref="[concept.construct]"/></section>
+<submitter>Daniel Kruegler</submitter>
+<date>29 May 2008</date>
+
+<discussion>
+ <p>A missing concept in [concept.construct]: Although (and rightly)
+declared in [utility.concepts], header <concepts> synopsis, the
+description and definition
+of <code>TriviallyDefaultConstructible</code> is missing.</p>
+</discussion>
+
+<resolution>
+ <p>Add the following to [concept.construct]:</p>
+ <pre>
+ <ins>concept TriviallyDefaultConstructible<typename T> : DefaultConstructible<T> {}</ins>
+ </pre>
+
+ <ol start="3">
+ <li><ins><i>Note</i>: describes types whose default constructor is trivial.</ins></li>
+ <li><ins><i>Requires</i>: for every type <code>T</code> that is a trivial type ([basic.types]) or a class type with a trivial default constructor ([class.ctor]), a concept map <code>TriviallyDefaultConstructible<T></code> shall be implicitly defined in namespace std.</ins></li>
+ </ol>
+</resolution>
+</issue>
Added: sandbox/committee/concepts/issues/issues/issue33.xml
==============================================================================
--- (empty file)
+++ sandbox/committee/concepts/issues/issues/issue33.xml 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -0,0 +1,29 @@
+<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
+<!DOCTYPE issue SYSTEM "lwg-issue.dtd" [
+ <!ENTITY nbsp " ">
+] >
+
+<issue num="33" status="Review">
+<title><code>ArithmeticLike</code> should have construction from an unsigned integral type</title>
+<section><sref ref="[concept.arithmetic]"/></section>
+<submitter>Daniel Kruegler</submitter>
+<date>29 May 2008</date>
+
+<discussion>
+ <p>It is necessary to add
+ the associated c'tor signature <code>T::T(uintmax_t)</code> to concept <code>ArithmeticLike</code>
+as well, because otherwise
+ <code>uintmax_t</code> itself would be excluded and <code>ArithmeticLike</code> itself is not restricted
+ on signed types (<code>uintmax_t</code> -> <code>intmax_t</code> can lead to overflow), e.g <code>HasNegate</code>
+ > is part of all arithmetic types.</p>
+</discussion>
+
+<resolution>
+ <p>Add the following to concept <code>ArithmeticLike</code>:</p>
+ <pre>
+ T::T(intmax_t);
+ <ins>T::T(uintmax_t);</ins>
+ T::T(long double);
+ </pre>
+</resolution>
+</issue>
Modified: sandbox/committee/concepts/stdlib/clib-concepts.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-concepts.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-concepts.tex 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -50,7 +50,7 @@
\begin{center}
\huge
Core Concepts for the C++0x Standard Library\\
-(Revision 2)
+(Revision 3)
\vspace{0.25in}
\normalsize
@@ -62,8 +62,8 @@
\end{center}
\vspace{0.25in}
-\par\noindent Document number: N2621=08-0131\vspace{-6pt}
-\par\noindent Revises document number: N2572=08-0082\vspace{-6pt}
+\par\noindent Document number: DRAFT\vspace{-6pt}
+\par\noindent Revises document number: N2621=08-0131\vspace{-6pt}
\par\noindent Date: \today\vspace{-6pt}
\par\noindent Project: Programming Language \Cpp{}, Library Working Group\vspace{-6pt}
\par\noindent Reply-to: Douglas Gregor $<$\href{mailto:dgregor_at_[hidden]}{dgregor_at_[hidden]}$>$\vspace{-6pt}
@@ -86,22 +86,9 @@
\editorial{Purely editorial comments will be written in a separate,
shaded box.}
-\paragraph*{Changes from N2572}
+\paragraph*{Changes from N2621}
\begin{itemize}
-\item Added the \tcode{Has*Assign} concepts, which are required by
- \tcode{valarray} and friends.
-\item Split \tcode{MoveAssignable} into the two-parameter
- \tcode{HasMoveAssign} and the one-parameter \tcode{MoveAssignable};
- the same split is also used for \tcode{CopyAssignable} and
- \tcode{HasCopyAssign}.
-\item Added the \tcode{MemberPointeeType} concept, and revised
- \tcode{ReferentType} to permit reference types.
-\item Renamed \tcode{HeapAllocatable} to \tcode{FreeStoreAllocatable},
- which better reflects the terminology of the standard.
-\item Changed the \tcode{IntegralLike} requirement for a \tcode{long
- long} constructor into a requirement for a \tcode{intmax_t}
- constructor.
-\item \tcode{ObjectType} now refines \tcode{MemberPointeeType}.
+\item Applied the proposed resolutions of concepts issues 15, 32, and 33.
\end{itemize}
\end{titlepage}
@@ -720,6 +707,21 @@
value.}
\end{itemdescr}
+\begin{itemdecl}
+@\addedZ{concept TriviallyDefaultConstructible<typename T> : DefaultConstructible<T> \{\}}@
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\addedZ{\mbox{\reallynote} describes types whose default constructor is trivial.}
+
+\pnum \addedZ{\mbox{\requires} for every type \mbox{\tcode{T}} that is
+ a trivial type (\mbox{\ref{basic.types}}) or a class type with a
+ trivial default constructor (\mbox{\ref{class.ctor}}), a concept map
+ \mbox{\tcode{TriviallyDefaultConstructible<T>}} shall be implicitly
+ defined in namespace \mbox{\tcode{std}}.}
+\end{itemdescr}
+
\rSec2[concept.copymove]{Copy and move}
\begin{itemdecl}
auto concept MoveConstructible<typename T> : HasConstructor<T, T&&> { }
@@ -1188,7 +1190,7 @@
\begin{itemdecl}
auto concept Callable<typename F, typename... Args> {
typename result_type;
- result_type operator()(F&, Args...);
+ result_type operator()(F&@\addedZ{\&}@, Args...);
}
\end{itemdecl}
@@ -1317,7 +1319,7 @@
\begin{itemdescr}
\pnum
-\mbox{\reallynote} describes types with an \mbox{\tcode{operator\^=}}.
+\mbox{\reallynote} describes types with an \mbox{\tcode{operator\^{}=}}.
\end{itemdescr}
\begin{itemdecl}
@@ -1351,6 +1353,7 @@
: Regular<T>, LessThanComparable<T>, HasPlus<T>, HasMinus<T>, HasMultiply<T>, HasDivide<T>,
HasUnaryPlus<T>, HasNegate<T> {
T::T(@\changedCC{long long}{intmax_t}@);
+ @\addedZ{T::T(uintmax_t);}@
@\addedCC{T::T(long double);}@
T& operator++(T&);
Modified: sandbox/committee/concepts/stdlib/macros.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/macros.tex (original)
+++ sandbox/committee/concepts/stdlib/macros.tex 2008-05-29 13:11:36 EDT (Thu, 29 May 2008)
@@ -1106,13 +1106,11 @@
\newcommand{\remitemCC}[1]{\remitem{#1}}
\newcommand{\additemCC}[1]{\item\addedCC{#1}}
-% Changes for Bellevue pre-meeting mailing
-\definecolor{green}{rgb}{0,.6,0}
-\newcommand{\addedZ}[1]{\textcolor{green}{\ul{#1}}}
+%% Concepts changes for the next revision
+\definecolor{zadd}{rgb}{0.8,0,0.8}
+\newcommand{\addedZ}[1]{\textcolor{zadd}{\ul{#1}}}
\newcommand{\removedZ}[1]{\textcolor{remclr}{\st{#1}}}
-\newcommand{\changedZ}[2]{\removedZ{#1}\addedZ{#2}}
-\newcommand{\remitemZ}[1]{\remitem{#1}}
-\newcommand{\additemZ}[1]{\item\addedZ{#1}}
+\newcommand{\changedCZ}[2]{\textcolor{addclr}{\st{#1}}\addedZ{#2}}
% Text common to all of the library proposals
\newcommand{\libintrotext}[1]{This document proposes changes to #1 of
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