|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53071 - in trunk: boost libs/type_traits/test
From: john_at_[hidden]
Date: 2009-05-17 05:12:32
Author: johnmaddock
Date: 2009-05-17 05:12:30 EDT (Sun, 17 May 2009)
New Revision: 53071
URL: http://svn.boost.org/trac/boost/changeset/53071
Log:
Added tests for aligned_storage::address() and fixed some Borland specific bugs (these show up in serialization/test/test_delete_pointer_binary_archive).
Text files modified:
trunk/boost/aligned_storage.hpp | 8 +++++++-
trunk/libs/type_traits/test/aligned_storage_empy_test.cpp | 8 +++++++-
trunk/libs/type_traits/test/aligned_storage_test.cpp | 3 +++
3 files changed, 17 insertions(+), 2 deletions(-)
Modified: trunk/boost/aligned_storage.hpp
==============================================================================
--- trunk/boost/aligned_storage.hpp (original)
+++ trunk/boost/aligned_storage.hpp 2009-05-17 05:12:30 EDT (Sun, 17 May 2009)
@@ -70,7 +70,13 @@
std::size_t size_
, std::size_t alignment_ = std::size_t(-1)
>
-class aligned_storage : private detail::aligned_storage::aligned_storage_imp<size_, alignment_>
+class aligned_storage :
+#ifndef __BORLANDC__
+ private
+#else
+ public
+#endif
+ detail::aligned_storage::aligned_storage_imp<size_, alignment_>
{
public: // constants
Modified: trunk/libs/type_traits/test/aligned_storage_empy_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/aligned_storage_empy_test.cpp (original)
+++ trunk/libs/type_traits/test/aligned_storage_empy_test.cpp 2009-05-17 05:12:30 EDT (Sun, 17 May 2009)
@@ -26,7 +26,13 @@
};
template< unsigned N, unsigned Alignment >
- struct alignment_implementation2 : private boost::detail::aligned_storage::aligned_storage_imp<N,Alignment>
+ struct alignment_implementation2 :
+#ifndef __BORLANDC__
+ private
+#else
+ public
+#endif
+ boost::detail::aligned_storage::aligned_storage_imp<N,Alignment>
{
typedef boost::detail::aligned_storage::aligned_storage_imp<N,Alignment> type;
const void* address() const { return static_cast<const type*>(this)->address(); }
Modified: trunk/libs/type_traits/test/aligned_storage_test.cpp
==============================================================================
--- trunk/libs/type_traits/test/aligned_storage_test.cpp (original)
+++ trunk/libs/type_traits/test/aligned_storage_test.cpp 2009-05-17 05:12:30 EDT (Sun, 17 May 2009)
@@ -66,6 +66,9 @@
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_CHECK(::tt::is_pod<t3>::value == true);
#endif
+ BOOST_CHECK(as3.address() == &as3);
+ const t3 as4 = { 0, };
+ BOOST_CHECK(as4.address() == static_cast<const void*>(&as4));
#endif
}
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