Added tests for aligned_storage::address() and fixed some Borland specific bugs (these show up in serialization/test/test_delete_pointer_binary_archive).

[SVN r53071]
This commit is contained in:
John Maddock committed 2009-05-17 09:12:30 +00:00
1 parent 8d163a019e
commit bc45b934b6
3 files changed
+17 -2

No files matched your search

+7 -1
View File
@@ -26,7 +26,13 @@ namespace
};
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(); }
+3
View File
@@ -66,6 +66,9 @@ void check(const T&)
#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
}