|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61550 - in trunk/libs/type_traits: doc doc/html doc/html/boost_typetraits doc/html/boost_typetraits/category doc/html/boost_typetraits/examples doc/html/boost_typetraits/reference examples
From: john_at_[hidden]
Date: 2010-04-25 04:30:00
Author: johnmaddock
Date: 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
New Revision: 61550
URL: http://svn.boost.org/trac/boost/changeset/61550
Log:
Change memcpy to memmove in example as ranges may overlap.
Update/regenerate docs.
Text files modified:
trunk/libs/type_traits/doc/examples.qbk | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/background.html | 22 +++++++++++-----------
trunk/libs/type_traits/doc/html/boost_typetraits/category/transform.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/examples/copy.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/history.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/intrinsics.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_const.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_cv.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_pointer.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_reference.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_volatile.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/decay.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/floating_point_promotion.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html | 4 ++--
trunk/libs/type_traits/doc/html/boost_typetraits/reference/integral_promotion.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_unsigned.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/promote.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_all_extents.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_const.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_cv.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_extent.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_pointer.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_reference.html | 2 +-
trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_volatile.html | 2 +-
trunk/libs/type_traits/doc/html/index.html | 2 +-
trunk/libs/type_traits/examples/copy_example.cpp | 39 +++++++++++++++++++++++++++++++++++++--
trunk/libs/type_traits/examples/fill_example.cpp | 36 +++++++++++++++++++++++++++++++++++-
28 files changed, 109 insertions(+), 40 deletions(-)
Modified: trunk/libs/type_traits/doc/examples.qbk
==============================================================================
--- trunk/libs/type_traits/doc/examples.qbk (original)
+++ trunk/libs/type_traits/doc/examples.qbk 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -36,7 +36,7 @@
template<typename T>
T* copy_imp(const T* first, const T* last, T* out, const boost::__true_type&)
{
- memcpy(out, first, (last-first)*sizeof(T));
+ memmove(out, first, (last-first)*sizeof(T));
return out+(last-first);
}
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/background.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/background.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/background.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -56,7 +56,7 @@
method available to them.
</p>
<a name="boost_typetraits.background.type_traits"></a><h5>
-<a name="id769755"></a>
+<a name="id769782"></a>
<a class="link" href="background.html#boost_typetraits.background.type_traits">Type Traits</a>
</h5>
<p>
@@ -84,7 +84,7 @@
given.
</p>
<a name="boost_typetraits.background.implementation"></a><h5>
-<a name="id769818"></a>
+<a name="id769846"></a>
<a class="link" href="background.html#boost_typetraits.background.implementation">Implementation</a>
</h5>
<p>
@@ -174,7 +174,7 @@
in the default template.
</p>
<a name="boost_typetraits.background.optimized_copy"></a><h5>
-<a name="id778597"></a>
+<a name="id778570"></a>
<a class="link" href="background.html#boost_typetraits.background.optimized_copy">Optimized copy</a>
</h5>
<p>
@@ -247,7 +247,7 @@
otherwise it will call the "slow but safe version".
</p>
<a name="boost_typetraits.background.was_it_worth_it_"></a><h5>
-<a name="id778944"></a>
+<a name="id778917"></a>
<a class="link" href="background.html#boost_typetraits.background.was_it_worth_it_">Was it worth it?</a>
</h5>
<p>
@@ -280,7 +280,7 @@
</li>
</ul></div>
<div class="table">
-<a name="id778981"></a><p class="title"><b>Table 1.1. Time taken to copy 1000 elements using `copy<const
+<a name="id778954"></a><p class="title"><b>Table 1.1. Time taken to copy 1000 elements using `copy<const
T*, T*>` (times in micro-seconds)</b></p>
<div class="table-contents"><table class="table" summary="Time taken to copy 1000 elements using `copy<const
T*, T*>` (times in micro-seconds)">
@@ -379,7 +379,7 @@
</table></div>
</div>
<br class="table-break"><a name="boost_typetraits.background.pair_of_references"></a><h5>
-<a name="id779119"></a>
+<a name="id779092"></a>
<a class="link" href="background.html#boost_typetraits.background.pair_of_references">Pair of References</a>
</h5>
<p>
@@ -416,7 +416,7 @@
to hold non-reference types, references, and constant references:
</p>
<div class="table">
-<a name="id779380"></a><p class="title"><b>Table 1.2. Required Constructor Argument Types</b></p>
+<a name="id779354"></a><p class="title"><b>Table 1.2. Required Constructor Argument Types</b></p>
<div class="table-contents"><table class="table" summary="Required Constructor Argument Types">
<colgroup>
<col>
@@ -481,7 +481,7 @@
adds a reference to its type, unless it is already a reference.
</p>
<div class="table">
-<a name="id779484"></a><p class="title"><b>Table 1.3. Using add_reference to synthesize the correct constructor
+<a name="id779457"></a><p class="title"><b>Table 1.3. Using add_reference to synthesize the correct constructor
type</b></p>
<div class="table-contents"><table class="table" summary="Using add_reference to synthesize the correct constructor
type">
@@ -598,7 +598,7 @@
easier to maintain and easier to understand.
</p>
<a name="boost_typetraits.background.conclusion"></a><h5>
-<a name="id779942"></a>
+<a name="id779915"></a>
<a class="link" href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
</h5>
<p>
@@ -611,7 +611,7 @@
can be optimal as well as generic.
</p>
<a name="boost_typetraits.background.acknowledgements"></a><h5>
-<a name="id779959"></a>
+<a name="id779932"></a>
<a class="link" href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
</h5>
<p>
@@ -619,7 +619,7 @@
comments when preparing this article.
</p>
<a name="background.references"></a><a name="boost_typetraits.background.references"></a><h5>
-<a name="id779979"></a>
+<a name="id779953"></a>
<a class="link" href="background.html#boost_typetraits.background.references">References</a>
</h5>
<div class="orderedlist"><ol type="1">
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/category/transform.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/category/transform.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/category/transform.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -91,7 +91,7 @@
<span class="keyword">struct</span> <a class="link" href="../reference/remove_volatile.html" title="remove_volatile">remove_volatile</a><span class="special">;</span>
</pre>
<a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a><h5>
-<a name="id783771"></a>
+<a name="id783745"></a>
<a class="link" href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
Compiler Workarounds:</a>
</h5>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/examples/copy.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/examples/copy.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/examples/copy.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -56,7 +56,7 @@
<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="identifier">T</span><span class="special">*</span> <span class="identifier">copy_imp</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">first</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">T</span><span class="special">*</span> <span class="identifier">out</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><a class="link" href="../reference/integral_constant.html" title="integral_constant">true_type</a><span class="special">&)</span>
<span class="special">{</span>
- <span class="identifier">memcpy</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="special">(</span><span class="identifier">last</span><span class="special">-</span><span class="identifier">first</span><span class="special">)*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">));</span>
+ <span class="identifier">memmove</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">first</span><span class="special">,</span> <span class="special">(</span><span class="identifier">last</span><span class="special">-</span><span class="identifier">first</span><span class="special">)*</span><span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">));</span>
<span class="keyword">return</span> <span class="identifier">out</span><span class="special">+(</span><span class="identifier">last</span><span class="special">-</span><span class="identifier">first</span><span class="special">);</span>
<span class="special">}</span>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/history.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/history.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/history.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -27,7 +27,7 @@
<a name="boost_typetraits.history"></a><a class="link" href="history.html" title="History"> History</a>
</h2></div></div></div>
<a name="boost_typetraits.history.boost_1_42_0"></a><h5>
-<a name="id832026"></a>
+<a name="id832817"></a>
<a class="link" href="history.html#boost_typetraits.history.boost_1_42_0">Boost 1.42.0</a>
</h5>
<div class="itemizedlist"><ul type="disc"><li>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/intrinsics.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/intrinsics.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/intrinsics.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -71,7 +71,7 @@
of the following macros:
</p>
<div class="table">
-<a name="id785322"></a><p class="title"><b>Table 1.4. Macros for Compiler Intrinsics</b></p>
+<a name="id785295"></a><p class="title"><b>Table 1.4. Macros for Compiler Intrinsics</b></p>
<div class="table-contents"><table class="table" summary="Macros for Compiler Intrinsics">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_const.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_const.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_const.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id790399"></a><p class="title"><b>Table 1.5. Examples</b></p>
+<a name="id790236"></a><p class="title"><b>Table 1.5. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_cv.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_cv.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_cv.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id790870"></a><p class="title"><b>Table 1.6. Examples</b></p>
+<a name="id790707"></a><p class="title"><b>Table 1.6. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_pointer.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_pointer.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_pointer.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -56,7 +56,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id791394"></a><p class="title"><b>Table 1.7. Examples</b></p>
+<a name="id792869"></a><p class="title"><b>Table 1.7. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_reference.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_reference.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_reference.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id793571"></a><p class="title"><b>Table 1.8. Examples</b></p>
+<a name="id793340"></a><p class="title"><b>Table 1.8. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_volatile.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_volatile.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_volatile.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id794036"></a><p class="title"><b>Table 1.9. Examples</b></p>
+<a name="id793804"></a><p class="title"><b>Table 1.9. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/decay.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/decay.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/decay.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -48,7 +48,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id795288"></a><p class="title"><b>Table 1.10. Examples</b></p>
+<a name="id795331"></a><p class="title"><b>Table 1.10. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/floating_point_promotion.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/floating_point_promotion.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/floating_point_promotion.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -49,7 +49,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id797142"></a><p class="title"><b>Table 1.11. Examples</b></p>
+<a name="id796911"></a><p class="title"><b>Table 1.11. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -59,7 +59,7 @@
</p></td></tr>
</table></div>
<div class="table">
-<a name="id797504"></a><p class="title"><b>Table 1.12. Function Traits Members</b></p>
+<a name="id797272"></a><p class="title"><b>Table 1.12. Function Traits Members</b></p>
<div class="table-contents"><table class="table" summary="Function Traits Members">
<colgroup>
<col>
@@ -122,7 +122,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id797716"></a><p class="title"><b>Table 1.13. Examples</b></p>
+<a name="id797485"></a><p class="title"><b>Table 1.13. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/integral_promotion.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/integral_promotion.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/integral_promotion.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -49,7 +49,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id805969"></a><p class="title"><b>Table 1.14. Examples</b></p>
+<a name="id805670"></a><p class="title"><b>Table 1.14. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id824336"></a><p class="title"><b>Table 1.15. Examples</b></p>
+<a name="id825124"></a><p class="title"><b>Table 1.15. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_unsigned.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_unsigned.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_unsigned.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id825909"></a><p class="title"><b>Table 1.16. Examples</b></p>
+<a name="id826697"></a><p class="title"><b>Table 1.16. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/promote.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/promote.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/promote.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -51,7 +51,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id826426"></a><p class="title"><b>Table 1.17. Examples</b></p>
+<a name="id827214"></a><p class="title"><b>Table 1.17. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_all_extents.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_all_extents.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_all_extents.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id827544"></a><p class="title"><b>Table 1.18. Examples</b></p>
+<a name="id828331"></a><p class="title"><b>Table 1.18. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_const.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_const.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_const.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id828700"></a><p class="title"><b>Table 1.19. Examples</b></p>
+<a name="id829487"></a><p class="title"><b>Table 1.19. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_cv.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_cv.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_cv.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id829223"></a><p class="title"><b>Table 1.20. Examples</b></p>
+<a name="id830010"></a><p class="title"><b>Table 1.20. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_extent.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_extent.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_extent.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id829745"></a><p class="title"><b>Table 1.21. Examples</b></p>
+<a name="id830532"></a><p class="title"><b>Table 1.21. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_pointer.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_pointer.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_pointer.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -55,7 +55,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id830292"></a><p class="title"><b>Table 1.22. Examples</b></p>
+<a name="id831080"></a><p class="title"><b>Table 1.22. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_reference.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_reference.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_reference.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id831071"></a><p class="title"><b>Table 1.23. Examples</b></p>
+<a name="id831862"></a><p class="title"><b>Table 1.23. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_volatile.html
==============================================================================
--- trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_volatile.html (original)
+++ trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_volatile.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
<div class="table">
-<a name="id831520"></a><p class="title"><b>Table 1.24. Examples</b></p>
+<a name="id832311"></a><p class="title"><b>Table 1.24. Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
Modified: trunk/libs/type_traits/doc/html/index.html
==============================================================================
--- trunk/libs/type_traits/doc/html/index.html (original)
+++ trunk/libs/type_traits/doc/html/index.html 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -30,7 +30,7 @@
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
Ramey and Jeremy Siek</p></div>
<div><div class="legalnotice">
-<a name="id769606"></a><p>
+<a name="id769633"></a><p>
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)
</p>
Modified: trunk/libs/type_traits/examples/copy_example.cpp
==============================================================================
--- trunk/libs/type_traits/examples/copy_example.cpp (original)
+++ trunk/libs/type_traits/examples/copy_example.cpp 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -52,7 +52,7 @@
template<typename T>
T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&)
{
- memcpy(out, first, (last-first)*sizeof(T));
+ memmove(out, first, (last-first)*sizeof(T));
return out+(last-first);
}
@@ -71,7 +71,18 @@
return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>());
}
-}; // namespace opt
+} // namespace opt
+
+namespace non_opt
+{
+
+template<typename I1, typename I2>
+inline I2 copy(I1 first, I1 last, I2 out)
+{
+ return opt::detail::copy_imp(first, last, out, boost::false_type());
+}
+
+}
//
// define some global data:
@@ -115,6 +126,18 @@
cout << "opt::copy<const int*, int*>: " << result << endl;
// cache load:
+ non_opt::copy(ci_array, ci_array + array_size, i_array);
+
+ // time non-optimised version:
+ t.restart();
+ for(i = 0; i < iter_count; ++i)
+ {
+ non_opt::copy(ci_array, ci_array + array_size, i_array);
+ }
+ result = t.elapsed();
+ cout << "non_opt::copy<const int*, int*>: " << result << endl;
+
+ // cache load:
std::copy(ci_array, ci_array + array_size, i_array);
// time standard version:
@@ -139,6 +162,18 @@
cout << "opt::copy<const char*, char*>: " << result << endl;
// cache load:
+ non_opt::copy(cc_array, cc_array + array_size, c_array);
+
+ // time optimised version:
+ t.restart();
+ for(i = 0; i < iter_count; ++i)
+ {
+ non_opt::copy(cc_array, cc_array + array_size, c_array);
+ }
+ result = t.elapsed();
+ cout << "non_opt::copy<const char*, char*>: " << result << endl;
+
+ // cache load:
std::copy(cc_array, cc_array + array_size, c_array);
// time standard version:
Modified: trunk/libs/type_traits/examples/fill_example.cpp
==============================================================================
--- trunk/libs/type_traits/examples/fill_example.cpp (original)
+++ trunk/libs/type_traits/examples/fill_example.cpp 2010-04-25 04:29:57 EDT (Sun, 25 Apr 2010)
@@ -69,7 +69,17 @@
detail::do_fill(first, last, val, truth_type());
}
-}; // namespace opt
+} // namespace opt
+
+namespace non_opt{
+
+template <class I, class T>
+inline void fill(I first, I last, const T& val)
+{
+ opt::detail::do_fill(first, last, val, boost::false_type());
+}
+
+}
//
// define some global data:
@@ -119,6 +129,18 @@
cout << "opt::fill<char*, char>: " << result << endl;
// cache load:
+ non_opt::fill(c_array, c_array + array_size, (char)3);
+
+ // time optimised version:
+ t.restart();
+ for(i = 0; i < iter_count; ++i)
+ {
+ non_opt::fill(c_array, c_array + array_size, (char)3);
+ }
+ result = t.elapsed();
+ cout << "non_opt::fill<char*, char>: " << result << endl;
+
+ // cache load:
std::fill(c_array, c_array + array_size, (char)3);
// time standard version:
@@ -145,6 +167,18 @@
cout << "opt::fill<int*, int>: " << result << endl;
// cache load:
+ non_opt::fill(i_array, i_array + array_size, 3);
+
+ // timer optimised version:
+ t.restart();
+ for(i = 0; i < iter_count; ++i)
+ {
+ non_opt::fill(i_array, i_array + array_size, 3);
+ }
+ result = t.elapsed();
+ cout << "non_opt::fill<int*, int>: " << result << endl;
+
+ // cache load:
std::fill(i_array, i_array + array_size, 3);
// time standard version:
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