mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-30 04:47:12 +02:00
Remove uses of boost::alignment_of
This commit is contained in:
@ -12,7 +12,6 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/core/alloc_construct.hpp>
|
||||
#include <boost/core/first_scalar.hpp>
|
||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/type_traits/enable_if.hpp>
|
||||
#include <boost/type_traits/extent.hpp>
|
||||
#include <boost/type_traits/is_bounded_array.hpp>
|
||||
@ -20,6 +19,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/type_traits/remove_extent.hpp>
|
||||
#include <boost/type_traits/type_with_alignment.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
@ -112,8 +112,8 @@ private:
|
||||
template<class T, class U>
|
||||
struct sp_array_alignment {
|
||||
enum {
|
||||
value = sp_max_size<boost::alignment_of<T>::value,
|
||||
boost::alignment_of<U>::value>::value
|
||||
value = sp_max_size<std::alignment_of<T>::value,
|
||||
std::alignment_of<U>::value>::value
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
#include <boost/smart_ptr/detail/lightweight_mutex.hpp>
|
||||
#include <boost/type_traits/type_with_alignment.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
#include <new> // ::operator new, ::operator delete
|
||||
#include <cstddef> // std::size_t
|
||||
|
||||
@ -74,7 +74,7 @@ template<unsigned size, unsigned align_> struct allocator_impl
|
||||
|
||||
static lightweight_mutex & mutex()
|
||||
{
|
||||
static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm;
|
||||
static freeblock< sizeof( lightweight_mutex ), std::alignment_of< lightweight_mutex >::value > fbm;
|
||||
static lightweight_mutex * pm = new( &fbm ) lightweight_mutex;
|
||||
return *pm;
|
||||
}
|
||||
@ -188,7 +188,7 @@ template<unsigned size, unsigned align_>
|
||||
unsigned allocator_impl<size, align_>::last = allocator_impl<size, align_>::items_per_page;
|
||||
|
||||
template<class T>
|
||||
struct quick_allocator: public allocator_impl< sizeof(T), boost::alignment_of<T>::value >
|
||||
struct quick_allocator: public allocator_impl< sizeof(T), std::alignment_of<T>::value >
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ template<class T, class A> class lsp_ms_deleter: public local_counted_impl_em
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename sp_aligned_storage<sizeof(T), ::boost::alignment_of<T>::value>::type storage_type;
|
||||
typedef typename sp_aligned_storage<sizeof(T), std::alignment_of<T>::value>::type storage_type;
|
||||
|
||||
storage_type storage_;
|
||||
A a_;
|
||||
|
@ -13,11 +13,11 @@
|
||||
|
||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||
#include <boost/type_traits/type_with_alignment.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <utility>
|
||||
#include <cstddef>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
@ -38,7 +38,7 @@ template< class T > class sp_ms_deleter
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type;
|
||||
typedef typename sp_aligned_storage< sizeof( T ), std::alignment_of< T >::value >::type storage_type;
|
||||
|
||||
bool initialized_;
|
||||
storage_type storage_;
|
||||
@ -109,7 +109,7 @@ template< class T, class A > class sp_as_deleter
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type;
|
||||
typedef typename sp_aligned_storage< sizeof( T ), std::alignment_of< T >::value >::type storage_type;
|
||||
|
||||
storage_type storage_;
|
||||
A a_;
|
||||
|
@ -8,9 +8,9 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/smart_ptr/make_local_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/align/is_aligned.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
template<class T = void>
|
||||
struct creator {
|
||||
@ -87,7 +87,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<int[3]> result =
|
||||
@ -95,7 +95,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<int[][2]> result =
|
||||
@ -103,7 +103,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<int[2][2]> result =
|
||||
@ -111,7 +111,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[]> result =
|
||||
@ -119,7 +119,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[3]> result =
|
||||
@ -127,7 +127,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[][2]> result =
|
||||
@ -135,7 +135,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[2][2]> result =
|
||||
@ -143,7 +143,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<type[]> result =
|
||||
@ -151,7 +151,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> other = result;
|
||||
result.reset();
|
||||
@ -163,7 +163,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> other = result;
|
||||
result.reset();
|
||||
@ -175,7 +175,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -187,7 +187,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[2][2]> other = result;
|
||||
result.reset();
|
||||
@ -199,7 +199,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[]> other = result;
|
||||
result.reset();
|
||||
@ -211,7 +211,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[3]> other = result;
|
||||
result.reset();
|
||||
@ -224,7 +224,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -236,7 +236,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[2][2]> other = result;
|
||||
result.reset();
|
||||
|
@ -8,9 +8,9 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/smart_ptr/make_local_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/align/is_aligned.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
template<class T = void>
|
||||
struct creator {
|
||||
@ -87,7 +87,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -98,7 +98,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -109,7 +109,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -121,7 +121,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -133,7 +133,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -144,7 +144,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -155,7 +155,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -167,7 +167,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -179,7 +179,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> w1 = result;
|
||||
result.reset();
|
||||
@ -191,7 +191,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> w1 = result;
|
||||
result.reset();
|
||||
@ -203,7 +203,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -214,7 +214,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -225,7 +225,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -236,7 +236,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -247,7 +247,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -258,7 +258,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
|
@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
template<class T = void>
|
||||
struct creator {
|
||||
@ -86,7 +86,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[3]> result =
|
||||
@ -94,7 +94,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[][2]> result =
|
||||
@ -102,7 +102,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[2][2]> result =
|
||||
@ -110,7 +110,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[]> result =
|
||||
@ -118,7 +118,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[3]> result =
|
||||
@ -126,7 +126,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[][2]> result =
|
||||
@ -134,7 +134,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[2][2]> result =
|
||||
@ -142,7 +142,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<type[]> result =
|
||||
@ -150,7 +150,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> other = result;
|
||||
result.reset();
|
||||
@ -162,7 +162,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> other = result;
|
||||
result.reset();
|
||||
@ -174,7 +174,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -186,7 +186,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[2][2]> other = result;
|
||||
result.reset();
|
||||
@ -198,7 +198,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[]> other = result;
|
||||
result.reset();
|
||||
@ -210,7 +210,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[3]> other = result;
|
||||
result.reset();
|
||||
@ -223,7 +223,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -235,7 +235,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[2][2]> other = result;
|
||||
result.reset();
|
||||
|
@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
template<class T = void>
|
||||
struct creator {
|
||||
@ -86,7 +86,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -97,7 +97,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -108,7 +108,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -120,7 +120,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -132,7 +132,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -143,7 +143,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -154,7 +154,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -166,7 +166,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -178,7 +178,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> w1 = result;
|
||||
result.reset();
|
||||
@ -190,7 +190,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> w1 = result;
|
||||
result.reset();
|
||||
@ -202,7 +202,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -213,7 +213,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -224,7 +224,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -235,7 +235,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -246,7 +246,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -257,7 +257,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
|
@ -8,9 +8,9 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/smart_ptr/make_local_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/align/is_aligned.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
class type {
|
||||
public:
|
||||
@ -50,7 +50,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<int[3]> result =
|
||||
@ -58,7 +58,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<int[][2]> result =
|
||||
@ -66,7 +66,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<int[2][2]> result =
|
||||
@ -74,7 +74,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[]> result =
|
||||
@ -82,7 +82,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[3]> result =
|
||||
@ -90,7 +90,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[][2]> result =
|
||||
@ -98,7 +98,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<const int[2][2]> result =
|
||||
@ -106,7 +106,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::local_shared_ptr<type[]> result =
|
||||
@ -114,7 +114,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> other = result;
|
||||
result.reset();
|
||||
@ -126,7 +126,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> other = result;
|
||||
result.reset();
|
||||
@ -138,7 +138,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -150,7 +150,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[2][2]> other = result;
|
||||
result.reset();
|
||||
@ -162,7 +162,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[]> other = result;
|
||||
result.reset();
|
||||
@ -174,7 +174,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[3]> other = result;
|
||||
result.reset();
|
||||
@ -186,7 +186,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -198,7 +198,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[2][2]> other = result;
|
||||
result.reset();
|
||||
|
@ -8,9 +8,9 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/smart_ptr/make_local_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/align/is_aligned.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
class type {
|
||||
public:
|
||||
@ -50,7 +50,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -61,7 +61,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -72,7 +72,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -84,7 +84,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -96,7 +96,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -107,7 +107,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -118,7 +118,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -130,7 +130,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -142,7 +142,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> w1 = result;
|
||||
result.reset();
|
||||
@ -154,7 +154,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> w1 = result;
|
||||
result.reset();
|
||||
@ -166,7 +166,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -177,7 +177,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -188,7 +188,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -199,7 +199,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -210,7 +210,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -221,7 +221,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.local_use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
|
@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
class type {
|
||||
public:
|
||||
@ -49,7 +49,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[3]> result =
|
||||
@ -57,7 +57,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[][2]> result =
|
||||
@ -65,7 +65,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<int[2][2]> result =
|
||||
@ -73,7 +73,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[]> result =
|
||||
@ -81,7 +81,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[3]> result =
|
||||
@ -89,7 +89,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[][2]> result =
|
||||
@ -97,7 +97,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<const int[2][2]> result =
|
||||
@ -105,7 +105,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
}
|
||||
{
|
||||
boost::shared_ptr<type[]> result =
|
||||
@ -113,7 +113,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> other = result;
|
||||
result.reset();
|
||||
@ -125,7 +125,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> other = result;
|
||||
result.reset();
|
||||
@ -137,7 +137,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -149,7 +149,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<type[2][2]> other = result;
|
||||
result.reset();
|
||||
@ -161,7 +161,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[]> other = result;
|
||||
result.reset();
|
||||
@ -173,7 +173,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<const type[3]> other = result;
|
||||
result.reset();
|
||||
@ -185,7 +185,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[][2]> other = result;
|
||||
result.reset();
|
||||
@ -197,7 +197,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
boost::weak_ptr<const type[2][2]> other = result;
|
||||
result.reset();
|
||||
|
@ -9,7 +9,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
#include <boost/smart_ptr/weak_ptr.hpp>
|
||||
#include <boost/type_traits/alignment_of.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
class type {
|
||||
public:
|
||||
@ -49,7 +49,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -60,7 +60,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -71,7 +71,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -83,7 +83,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -95,7 +95,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -106,7 +106,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0] == 0);
|
||||
BOOST_TEST(result[1] == 0);
|
||||
BOOST_TEST(result[2] == 0);
|
||||
@ -117,7 +117,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -129,7 +129,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<int>::value));
|
||||
std::alignment_of<int>::value));
|
||||
BOOST_TEST(result[0][0] == 0);
|
||||
BOOST_TEST(result[0][1] == 0);
|
||||
BOOST_TEST(result[1][0] == 0);
|
||||
@ -141,7 +141,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[]> w1 = result;
|
||||
result.reset();
|
||||
@ -153,7 +153,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
boost::weak_ptr<type[3]> w1 = result;
|
||||
result.reset();
|
||||
@ -165,7 +165,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -176,7 +176,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -187,7 +187,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -198,7 +198,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 3);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -209,7 +209,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
@ -220,7 +220,7 @@ int main()
|
||||
BOOST_TEST(result.get() != 0);
|
||||
BOOST_TEST(result.use_count() == 1);
|
||||
BOOST_TEST(boost::alignment::is_aligned(result.get(),
|
||||
boost::alignment_of<type>::value));
|
||||
std::alignment_of<type>::value));
|
||||
BOOST_TEST(type::instances == 4);
|
||||
result.reset();
|
||||
BOOST_TEST(type::instances == 0);
|
||||
|
Reference in New Issue
Block a user