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

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