Utility/declval: update history.

[SVN r78730]
This commit is contained in:
Vicente J. Botet Escriba 2012-05-28 19:00:53 +00:00
parent 88e7d86270
commit 2fc827ad23
2 changed files with 17 additions and 21 deletions

View File

@ -1,7 +1,6 @@
[/ [/
/ Copyright (c) 2008 Howard Hinnant / Copyright (c) 2008 Howard Hinnant
/ Copyright (c) 2008 Beman Dawes / Copyright (c) 2009-20012 Vicente J. Botet Escriba
/ Copyright (c) 2009-20010 Vicente J. Botet Escriba
/ /
/ Distributed under the Boost Software License, Version 1.0. (See accompanying / Distributed under the Boost Software License, Version 1.0. (See accompanying
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -10,10 +9,8 @@
[article Declval [article Declval
[quickbook 1.5] [quickbook 1.5]
[authors [Hinnant, Howard]] [authors [Hinnant, Howard]]
[authors [Dawes, Beman]]
[authors [Botet Escriba, Vicente J.]] [authors [Botet Escriba, Vicente J.]]
[copyright 2008 Howard Hinnant] [copyright 2008 Howard Hinnant]
[copyright 2008 Beman Dawes]
[copyright 2009-2012 Vicente J. Botet Escriba] [copyright 2009-2012 Vicente J. Botet Escriba]
[license [license
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
@ -59,9 +56,9 @@ T is an lvalue-reference, otherwise an rvalue. To extend the domain of this func
typename std::add_rvalue_reference<T>::type declval(); // not used typename std::add_rvalue_reference<T>::type declval(); // not used
which ensures that we can also use cv void as template parameter. The careful reader might have noticed that `declval()` which ensures that we can also use cv void as template parameter. The careful reader might have noticed that `declval()`
already exists under the name create() as part of the definition of the semantics of the type trait is_convertible in the C==0x standard. already exists under the name create() as part of the definition of the semantics of the type trait is_convertible in the C++0x standard.
The provision of a new library component that allows the production of values in unevaluated expressions is considered as The provision of a new library component that allows the production of values in unevaluated expressions is considered
important to realize constrained templates in C++0x where concepts are not available. important to realize constrained templates in C++0x where concepts are not available.
This extremely light-weight function is expected to be part of the daily tool-box of the C++0x programmer. This extremely light-weight function is expected to be part of the daily tool-box of the C++0x programmer.
@ -77,7 +74,7 @@ This extremely light-weight function is expected to be part of the daily tool-bo
namespace boost { namespace boost {
template <typename T> template <typename T>
typename add_rvalue_reference<T>::type declval(); //noexcept; // as unevaluated operand typename add_rvalue_reference<T>::type declval() noexcept; // as unevaluated operand
} // namespace boost } // namespace boost
@ -96,7 +93,7 @@ The library provides the function template declval to simplify the definition of
template <class To, class From> template <class To, class From>
decltype(static_cast<To>(declval<From>())) convert(From&&); decltype(static_cast<To>(declval<From>())) convert(From&&);
Declares a function template convert which only participats in overloading if the type From can be explicitly converted to type To. Declares a function template convert which only participates in overloading if the type From can be explicitly converted to type To.
[endsect] [endsect]
@ -113,3 +110,6 @@ Fixes:
[endsect] [endsect]

View File

@ -27,17 +27,13 @@
<span class="firstname">Howard</span> <span class="surname">Hinnant</span> <span class="firstname">Howard</span> <span class="surname">Hinnant</span>
</h3></div> </h3></div>
<div class="author"><h3 class="author"> <div class="author"><h3 class="author">
<span class="firstname">Beman</span> <span class="surname">Dawes</span>
</h3></div>
<div class="author"><h3 class="author">
<span class="firstname">Vicente J.</span> <span class="surname">Botet Escriba</span> <span class="firstname">Vicente J.</span> <span class="surname">Botet Escriba</span>
</h3></div> </h3></div>
</div></div> </div></div>
<div><p class="copyright">Copyright &#169; 2008 Howard Hinnant</p></div> <div><p class="copyright">Copyright &#169; 2008 Howard Hinnant</p></div>
<div><p class="copyright">Copyright &#169; 2008 Beman Dawes</p></div>
<div><p class="copyright">Copyright &#169; 2009 -2012 Vicente J. Botet Escriba</p></div> <div><p class="copyright">Copyright &#169; 2009 -2012 Vicente J. Botet Escriba</p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="idp13448880"></a><p> <a name="idp13449552"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p> </p>
@ -104,13 +100,13 @@
which ensures that we can also use cv void as template parameter. The careful which ensures that we can also use cv void as template parameter. The careful
reader might have noticed that <code class="computeroutput"><span class="identifier">declval</span><span class="special">()</span></code> already exists under the name create() as reader might have noticed that <code class="computeroutput"><span class="identifier">declval</span><span class="special">()</span></code> already exists under the name create() as
part of the definition of the semantics of the type trait is_convertible in part of the definition of the semantics of the type trait is_convertible in
the C==0x standard. the C++0x standard.
</p> </p>
<p> <p>
The provision of a new library component that allows the production of values The provision of a new library component that allows the production of values
in unevaluated expressions is considered as important to realize constrained in unevaluated expressions is considered important to realize constrained templates
templates in C++0x where concepts are not available. This extremely light-weight in C++0x where concepts are not available. This extremely light-weight function
function is expected to be part of the daily tool-box of the C++0x programmer. is expected to be part of the daily tool-box of the C++0x programmer.
</p> </p>
</div> </div>
<div class="section"> <div class="section">
@ -123,7 +119,7 @@
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">typename</span> <span class="identifier">add_rvalue_reference</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">declval</span><span class="special">();</span> <span class="comment">//noexcept; // as unevaluated operand <span class="keyword">typename</span> <span class="identifier">add_rvalue_reference</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span> <span class="identifier">declval</span><span class="special">()</span> <span class="identifier">noexcept</span><span class="special">;</span> <span class="comment">// as unevaluated operand
</span> </span>
<span class="special">}</span> <span class="comment">// namespace boost <span class="special">}</span> <span class="comment">// namespace boost
</span></pre> </span></pre>
@ -149,7 +145,7 @@
<span class="identifier">decltype</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;(</span><span class="identifier">declval</span><span class="special">&lt;</span><span class="identifier">From</span><span class="special">&gt;()))</span> <span class="identifier">convert</span><span class="special">(</span><span class="identifier">From</span><span class="special">&amp;&amp;);</span> <span class="identifier">decltype</span><span class="special">(</span><span class="keyword">static_cast</span><span class="special">&lt;</span><span class="identifier">To</span><span class="special">&gt;(</span><span class="identifier">declval</span><span class="special">&lt;</span><span class="identifier">From</span><span class="special">&gt;()))</span> <span class="identifier">convert</span><span class="special">(</span><span class="identifier">From</span><span class="special">&amp;&amp;);</span>
</pre> </pre>
<p> <p>
Declares a function template convert which only participats in overloading Declares a function template convert which only participates in overloading
if the type From can be explicitly converted to type To. if the type From can be explicitly converted to type To.
</p> </p>
</div> </div>
@ -158,7 +154,7 @@
<a name="declval.history"></a><a class="link" href="declval.html#declval.history" title="History">History</a> <a name="declval.history"></a><a class="link" href="declval.html#declval.history" title="History">History</a>
</h2></div></div></div> </h2></div></div></div>
<a name="declval.history.boost_1_50"></a><h4> <a name="declval.history.boost_1_50"></a><h4>
<a name="idp13551456"></a> <a name="idp13553216"></a>
<a class="link" href="declval.html#declval.history.boost_1_50">boost 1.50</a> <a class="link" href="declval.html#declval.history.boost_1_50">boost 1.50</a>
</h4> </h4>
<p> <p>
@ -171,7 +167,7 @@
</div> </div>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: April 01, 2012 at 20:13:37 GMT</small></p></td> <td align="left"><p><small>Last revised: May 28, 2012 at 18:59:06 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>