Remove uses of boost::alignment_of

This commit is contained in:
Peter Dimov
2024-10-06 18:57:30 +03:00
parent c5023afe04
commit 1361171bac
12 changed files with 146 additions and 146 deletions

View File

@@ -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();