mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-10-10 14:35:25 +02:00
Remove uses of boost::alignment_of
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user