Boost logo

Boost-Commit :

From: nielsdekker_at_[hidden]
Date: 2008-02-18 17:13:21


Author: niels_dekker
Date: 2008-02-18 17:13:21 EST (Mon, 18 Feb 2008)
New Revision: 43309
URL: http://svn.boost.org/trac/boost/changeset/43309

Log:
Tested the assignment of value_initialized<T>, for T being a C-style array. Related to the fix of changeset [43308]
Text files modified:
   trunk/libs/utility/value_init_test.cpp | 6 +++++-
   1 files changed, 5 insertions(+), 1 deletions(-)

Modified: trunk/libs/utility/value_init_test.cpp
==============================================================================
--- trunk/libs/utility/value_init_test.cpp (original)
+++ trunk/libs/utility/value_init_test.cpp 2008-02-18 17:13:21 EST (Mon, 18 Feb 2008)
@@ -7,7 +7,7 @@
 // Test program for "boost/utility/value_init.hpp"
 //
 // 21 Ago 2002 (Created) Fernando Cacciola
-// 19 Jan 2008 (Added tests regarding compiler issues and initialized_value) Fernando Cacciola, Niels Dekker
+// 18 Feb 2008 (Added tests regarding compiler issues and initialized_value) Fernando Cacciola, Niels Dekker
 
 #include <cstring> // For memcmp.
 #include <iostream>
@@ -305,6 +305,10 @@
   boost::value_initialized<ArrayOfBytes> valueInitializedArrayOfBytes;
   BOOST_CHECK (std::memcmp(get(valueInitializedArrayOfBytes), zeroInitializedArrayOfBytes, sizeof(ArrayOfBytes)) == 0);
 
+ boost::value_initialized<ArrayOfBytes> valueInitializedArrayOfBytes2;
+ valueInitializedArrayOfBytes2 = valueInitializedArrayOfBytes;
+ BOOST_CHECK (std::memcmp(get(valueInitializedArrayOfBytes), get(valueInitializedArrayOfBytes2), sizeof(ArrayOfBytes)) == 0);
+
   boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester1;
   BOOST_CHECK ( ! get(copyFunctionCallTester1).is_copy_constructed);
   BOOST_CHECK ( ! get(copyFunctionCallTester1).is_assignment_called);


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