|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65305 - in sandbox/chrono/libs/type_traits_ext/doc: . html
From: vicente.botet_at_[hidden]
Date: 2010-09-05 14:50:03
Author: viboes
Date: 2010-09-05 14:50:02 EDT (Sun, 05 Sep 2010)
New Revision: 65305
URL: http://svn.boost.org/trac/boost/changeset/65305
Log:
update doc
Text files modified:
sandbox/chrono/libs/type_traits_ext/doc/html/index.html | 202 +++++++++++++++++++++++++++++----------
sandbox/chrono/libs/type_traits_ext/doc/type_traits_ext.qbk | 41 +++++--
2 files changed, 175 insertions(+), 68 deletions(-)
Modified: sandbox/chrono/libs/type_traits_ext/doc/html/index.html
==============================================================================
--- sandbox/chrono/libs/type_traits_ext/doc/html/index.html (original)
+++ sandbox/chrono/libs/type_traits_ext/doc/html/index.html 2010-09-05 14:50:02 EDT (Sun, 05 Sep 2010)
@@ -34,7 +34,7 @@
</h3></div>
</div></div>
<div><p class="copyright">Copyright © 2008 Howard Hinnant</p></div>
-<div><p class="copyright">Copyright © 2006 , 2008 Beman Dawes</p></div>
+<div><p class="copyright">Copyright © 2008 Beman Dawes</p></div>
<div><p class="copyright">Copyright © 2009 -2010 Vicente J. Botet Escriba</p></div>
<div><div class="legalnotice">
<a name="id4986971"></a><p>
@@ -163,7 +163,7 @@
<a name="boost_typetraits_ext.overview.motivation"></a>Motivation
</h3></div></div></div>
<a name="boost_typetraits_ext.overview.motivation.time"></a><h4>
-<a name="id4948838"></a>
+<a name="id4948839"></a>
<a href="index.html#boost_typetraits_ext.overview.motivation.time">Time</a>
</h4>
<p>
@@ -268,7 +268,7 @@
library. You don't need to compile it before use.
</p>
<a name="boost_typetraits_ext.users_guide.getting_started.install.requirements"></a><h5>
-<a name="id4949174"></a>
+<a name="id4949175"></a>
<a href="index.html#boost_typetraits_ext.users_guide.getting_started.install.requirements">Requirements</a>
</h5>
<p>
@@ -314,7 +314,7 @@
You don't need to link with any library.
</p>
<a name="boost_typetraits_ext.users_guide.getting_started.install.exceptions_safety_"></a><h5>
-<a name="id4949358"></a>
+<a name="id4949359"></a>
<a href="index.html#boost_typetraits_ext.users_guide.getting_started.install.exceptions_safety_">Exceptions
safety </a>
</h5>
@@ -542,10 +542,10 @@
Returns the earliest time_point.
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Clock</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration1</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Duration2</span><span class="special">></span>
-<span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span> <a href="index.html#boost_typetraits_ext.reference.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">__time_point__</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span>
- <span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
-<span class="identifier">min</span><span class="special">(</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">></span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">__time_point__</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="identifier">t2</span><span class="special">)</span>
+<span class="keyword">typename</span> <a href="index.html#boost_typetraits_ext.reference.common_type_hpp.common_type" title="
+ Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><span class="special"><</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">>,</span>
+ <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
+<span class="identifier">min</span><span class="special">(</span><span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration1</span><span class="special">></span> <span class="identifier">t1</span><span class="special">,</span> <span class="identifier">chrono</span><span class="special">::</span><span class="identifier">time_point</span><span class="special"><</span><span class="identifier">Clock</span><span class="special">,</span> <span class="identifier">Duration2</span><span class="special">></span> <span class="identifier">t2</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">t2</span> <span class="special"><</span> <span class="identifier">t1</span> <span class="special">?</span> <span class="identifier">t2</span> <span class="special">:</span> <span class="identifier">t1</span><span class="special">;</span>
<span class="special">}</span>
@@ -556,11 +556,8 @@
</p>
<pre class="programlisting"><span class="identifier">BOOST_AUTO</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">seconds</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
<span class="identifier">BOOST_AUTO</span><span class="special">(</span><span class="identifier">t2</span><span class="special">,</span> <span class="identifier">system_clock</span><span class="special">::</span><span class="identifier">now</span><span class="special">()</span> <span class="special">+</span> <span class="identifier">nanoseconds</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
-<span class="identifier">BOOST_AUTO</span><span class="special">(</span><span class="identifier">t3</span><span class="special">,</span> <span class="special">(</span><span class="identifier">min</span><span class="special">)(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">));</span>
+<span class="identifier">BOOST_AUTO</span><span class="special">(</span><span class="identifier">t3</span><span class="special">,</span> <span class="identifier">min</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="identifier">t2</span><span class="special">));</span>
</pre>
-<p>
- <span class="emphasis"><em>See the source file example/min_time_point.cpp</em></span>
- </p>
</div>
</div>
</div>
@@ -617,20 +614,19 @@
<span class="keyword">typedef</span> <span class="special"><</span><span class="identifier">see</span> <span class="identifier">below</span><span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">}</span>
</pre>
-<div class="itemizedlist"><ul type="disc">
-<li>
- type:* If T names an object or function type then the member typedef
- type shall name T&&; otherwise, type shall name T.
- </li>
-<li>
- Note:* This rule reflects the semantics of reference collapsing. For
- example, when a type T names a type T1&, the type add_rvalue_reference<T>::type
- is not an rvalue reference.
- </li>
-<li>
- C++ Standard Reference:* 20.7.6.2
- </li>
-</ul></div>
+<p>
+ <span class="bold"><strong>type:</strong></span> If T names an object or function
+ type then the member typedef type shall name T&&; otherwise, type
+ shall name T.
+ </p>
+<p>
+ <span class="bold"><strong>Note:</strong></span> This rule reflects the semantics
+ of reference collapsing. For example, when a type T names a type T1&,
+ the type add_rvalue_reference<T>::type is not an rvalue reference.
+ </p>
+<p>
+ <span class="bold"><strong>C++ Standard Reference:</strong></span> 20.7.6.2
+ </p>
</div>
</div>
<div class="section" lang="en">
@@ -798,18 +794,17 @@
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">typename</span> <span class="identifier">add_rvalue_reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">declval</span><span class="special">();</span>
</pre>
-<div class="itemizedlist"><ul type="disc">
-<li>
- Remarks:* If this function is used, the program is ill-formed.
- </li>
-<li>
- Remarks:* The template parameter T of declval may be an incomplete
- type.
- </li>
-<li>
- Example:*
- </li>
-</ul></div>
+<p>
+ <span class="bold"><strong>Remarks:</strong></span> If this function is used, the
+ program is ill-formed.
+ </p>
+<p>
+ <span class="bold"><strong>Remarks:</strong></span> The template parameter T of declval
+ may be an incomplete type.
+ </p>
+<p>
+ <span class="bold"><strong>Example:</strong></span>
+ </p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">To</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">From</span><span class="special">></span>
<span class="identifier">decltype</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special"><</span><span class="identifier">To</span><span class="special">>(</span><span class="identifier">declval</span><span class="special"><</span><span class="identifier">From</span><span class="special">>()))</span> <span class="identifier">convert</span><span class="special">(</span><span class="identifier">From</span><span class="special">&&);</span>
</pre>
@@ -838,7 +833,10 @@
<dt><span class="section"><a href="index.html#boost_typetraits_ext.appendices.acknowledgements"> Appendix
E: Acknowledgements</a></span></dt>
<dt><span class="section"> Appendix F: Tests</span></dt>
-<dd><dl><dt><span class="section">common_type
</span></dt></dl></dd>
+<dd><dl>
+<dt><span class="section">common_type
</span></dt>
+<dt><span class="section">add_rvalue_reference
</span></dt>
+</dl></dd>
<dt><span class="section"><a href="index.html#boost_typetraits_ext.appendices.tickets"> Appendix G:
Tickets</a></span></dt>
<dt><span class="section"><a href="index.html#boost_typetraits_ext.appendices.todo"> Appendix H: Future
@@ -884,11 +882,10 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits_ext.appendices.faq"></a> Appendix D: FAQ
</h3></div></div></div>
-<a name="boost_typetraits_ext.appendices.faq.how_important_is_the_order_of_the___link_linkend__boost_typetraits_ext_reference_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__lt__gt__template_arguments_"></a><h4>
-<a name="id4997995"></a>
- <a href="index.html#boost_typetraits_ext.appendices.faq.how_important_is_the_order_of_the___link_linkend__boost_typetraits_ext_reference_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__lt__gt__template_arguments_">How
- important is the order of the <a href="index.html#boost_typetraits_ext.reference.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><> template arguments?</a>
+<a name="boost_typetraits_ext.appendices.faq.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_"></a><h4>
+<a name="id4998009"></a>
+ <a href="index.html#boost_typetraits_ext.appendices.faq.how_important_is_the_order_of_the_common_type_lt__gt__template_arguments_">How
+ important is the order of the common_type<> template arguments?</a>
</h4>
<p>
The order of the template parameters is important. First <a href="index.html#boost_typetraits_ext.reference.common_type_hpp.common_type" title="
@@ -925,11 +922,10 @@
Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a><A,B,C>::type is
also undefined.
</p>
-<a name="boost_typetraits_ext.appendices.faq.can_you_explain_the_pros_cons_of___link_linkend__boost_typetraits_ext_reference_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__against_boost_typeof_"></a><h4>
-<a name="id4998501"></a>
- <a href="index.html#boost_typetraits_ext.appendices.faq.can_you_explain_the_pros_cons_of___link_linkend__boost_typetraits_ext_reference_common_type_hpp_common_type___code__phrase_role__identifier__common_type__phrase___code___link__against_boost_typeof_">Can
- you explain the pros/cons of <a href="index.html#boost_typetraits_ext.reference.common_type_hpp.common_type" title="
- Class Template common_type<>"><code class="computeroutput"><span class="identifier">common_type</span></code></a> against Boost.Typeof?</a>
+<a name="boost_typetraits_ext.appendices.faq.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_"></a><h4>
+<a name="id4998492"></a>
+ <a href="index.html#boost_typetraits_ext.appendices.faq.can_you_explain_the_pros_cons_of_common_type_against_boost_typeof_">Can
+ you explain the pros/cons of common_type against Boost.Typeof?</a>
</h4>
<p>
Even if in a first look they sound to be close, <a href="index.html#boost_typetraits_ext.reference.common_type_hpp.common_type" title="
@@ -992,7 +988,10 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits_ext.appendices.tests"></a> Appendix F: Tests
</h3></div></div></div>
-<div class="toc"><dl><dt><span class="section">common_type
</span></dt></dl></div>
+<div class="toc"><dl>
+<dt><span class="section">common_type
</span></dt>
+<dt><span class="section">add_rvalue_reference
</span></dt>
+</dl></div>
<p>
In order to test you need to do.
</p>
@@ -1043,7 +1042,8 @@
</p>
</th>
</tr></thead>
-<tbody><tr>
+<tbody>
+<tr>
<td>
<p>
common_type_test
@@ -1069,6 +1069,102 @@
#
</p>
</td>
+</tr>
+<tr>
+<td>
+ <p>
+ common_type_fails
+ </p>
+ </td>
+<td>
+ <p>
+ compile-fails
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_typetraits_ext.appendices.tests._add_rvalue_reference_"></a>add_rvalue_reference
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ kind
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Result
+ </p>
+ </th>
+<th>
+ <p>
+ Ticket
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ add_rvalue_reference_test
+ </p>
+ </td>
+<td>
+ <p>
+ run
+ </p>
+ </td>
+<td>
+ <p>
+ ...
+ </p>
+ </td>
+<td>
+ <p>
+ Pass
+ </p>
+ </td>
+<td>
+ <p>
+ #
+ </p>
+ </td>
</tr></tbody>
</table></div>
</div>
@@ -1117,7 +1213,7 @@
plans</a>
</h3></div></div></div>
<a name="boost_typetraits_ext.appendices.todo.for_later_releases"></a><h4>
-<a name="id4998992"></a>
+<a name="id4999121"></a>
<a href="index.html#boost_typetraits_ext.appendices.todo.for_later_releases">For
later releases</a>
</h4>
@@ -1129,7 +1225,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: September 05, 2010 at 16:47:04 GMT</small></p></td>
+<td align="left"><p><small>Last revised: September 05, 2010 at 18:47:29 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/chrono/libs/type_traits_ext/doc/type_traits_ext.qbk
==============================================================================
--- sandbox/chrono/libs/type_traits_ext/doc/type_traits_ext.qbk (original)
+++ sandbox/chrono/libs/type_traits_ext/doc/type_traits_ext.qbk 2010-09-05 14:50:02 EDT (Sun, 05 Sep 2010)
@@ -1,6 +1,6 @@
[/
/ Copyright (c) 2008 Howard Hinnant
- / Copyright (c) 2006, 2008 Beman Dawes
+ / Copyright (c) 2008 Beman Dawes
/ Copyright (c) 2009-20010 Vicente J. Botet Escriba
/
/ Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -13,7 +13,7 @@
[authors [Dawes, Beman]]
[authors [Botet Escriba, Vicente J.]]
[copyright 2008 Howard Hinnant]
- [copyright 2006, 2008 Beman Dawes]
+ [copyright 2008 Beman Dawes]
[copyright 2009-2010 Vicente J. Botet Escriba]
[license
Distributed under the Boost Software License, Version 1.0.
@@ -295,9 +295,9 @@
Returns the earliest time_point.
template <class Clock, class Duration1, class Duration2>
- typename boost::__common_type__<__time_point__<Clock, Duration1>,
- time_point<Clock, Duration2> >::type
- min(time_point<Clock, Duration1> t1, __time_point__<Clock, Duration2> t2)
+ typename __common_type__<chrono::time_point<Clock, Duration1>,
+ chrono::time_point<Clock, Duration2> >::type
+ min(chrono::time_point<Clock, Duration1> t1, chrono::time_point<Clock, Duration2> t2)
{
return t2 < t1 ? t2 : t1;
}
@@ -306,9 +306,9 @@
BOOST_AUTO(t1, system_clock::now() + seconds(3));
BOOST_AUTO(t2, system_clock::now() + nanoseconds(3));
- BOOST_AUTO(t3, (min)(t1, t2));
+ BOOST_AUTO(t3, min(t1, t2));
-['See the source file [@../../example/min_time_point.cpp example/min_time_point.cpp]]
+[/See the source file [@../../example/min_time_point.cpp example/min_time_point.cpp]]
[endsect]
@@ -340,12 +340,12 @@
typedef <see below> type;
}
-*type:* If T names an object or function type then the member typedef type shall name T&&; otherwise, type shall name T.
+[*type:] If T names an object or function type then the member typedef type shall name T&&; otherwise, type shall name T.
-*Note:* This rule reflects the semantics of reference collapsing. For example, when a type T names a type T1&, the type add_rvalue_reference<T>::type is not an rvalue
+[*Note:] This rule reflects the semantics of reference collapsing. For example, when a type T names a type T1&, the type add_rvalue_reference<T>::type is not an rvalue
reference.
-*C++ Standard Reference:* 20.7.6.2
+[*C++ Standard Reference:] 20.7.6.2
[endsect]
[endsect]
@@ -445,10 +445,11 @@
template <typename T>
typename add_rvalue_reference<T>::type declval();
-*Remarks:* If this function is used, the program is ill-formed.
-*Remarks:* The template parameter T of declval may be an incomplete type.
+[*Remarks:] If this function is used, the program is ill-formed.
-*Example:*
+[*Remarks:] The template parameter T of declval may be an incomplete type.
+
+[*Example:]
template <class To, class From>
decltype(static_cast<To>(declval<From>())) convert(From&&);
@@ -496,7 +497,7 @@
[/======================================================]
[section:faq Appendix D: FAQ]
-[heading How important is the order of the __common_type__<> template arguments?]
+[heading How important is the order of the common_type<> template arguments?]
The order of the template parameters is important. First __common_type__<> is not able to find out common type if it is not present and second
__common_type__<A,B,C>::type is equivalent to __common_type__<__common_type__<A,B>::type, C>::type.
@@ -522,7 +523,7 @@
Thus, as __common_type__<A,B>::type is undefined, __common_type__<A,B,C>::type is also undefined.
-[heading Can you explain the pros/cons of __common_type__ against Boost.Typeof?]
+[heading Can you explain the pros/cons of common_type against Boost.Typeof?]
Even if in a first look they sound to be close, __common_type__ and typeof have
different purposes. You use typeof to get the type of an expression, while
@@ -577,9 +578,19 @@
[table
[[Name] [kind] [Description] [Result] [Ticket]]
[[common_type_test] [run] [...] [Pass] [#]]
+ [[common_type_fails] [compile-fails] [...] [Pass] [#]]
]
[endsect]
+[section `add_rvalue_reference`]
+[table
+ [[Name] [kind] [Description] [Result] [Ticket]]
+ [[add_rvalue_reference_test] [run] [...] [Pass] [#]]
+]
+[endsect]
+
+
+
[endsect]
[/=====================================]
[section:tickets Appendix G: Tickets]
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