Remove Boost.StaticAsser dependency

This commit is contained in:
Ion Gaztañaga
2024-01-02 19:46:05 +01:00
parent 716ec48861
commit 7c74232a40
62 changed files with 344 additions and 348 deletions
+28 -29
View File
@@ -9,7 +9,6 @@
//////////////////////////////////////////////////////////////////////////////
#include <cstddef>
#include <boost/container/allocator_traits.hpp>
#include <boost/static_assert.hpp>
#include <boost/container/detail/type_traits.hpp>
#include <boost/container/detail/function_detector.hpp>
#include <boost/move/utility_core.hpp>
@@ -250,66 +249,66 @@ int main()
test_void_allocator();
//SimpleAllocator
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::value_type, int>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::pointer, int*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::const_pointer, const int*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::void_pointer, void*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::const_void_pointer, const void*>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::difference_type, std::ptrdiff_t>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::size_type, std::size_t>::value ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::propagate_on_container_copy_assignment::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::propagate_on_container_move_assignment::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::propagate_on_container_swap::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::is_always_equal::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< SimpleAllocator<int> >::is_partially_propagable::value == false ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::rebind_traits<double>::allocator_type
, SimpleAllocator<double> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< SimpleAllocator<int> >::rebind_alloc<double>::value_type
, double >::value ));
//ComplexAllocator
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::value_type, int>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::pointer, SimpleSmartPtr<int> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::const_pointer, SimpleSmartPtr<const int> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::void_pointer, SimpleSmartPtr<void> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::const_void_pointer, SimpleSmartPtr<const void> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::difference_type, signed short>::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::size_type, unsigned short>::value ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::propagate_on_container_copy_assignment::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::propagate_on_container_move_assignment::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::propagate_on_container_swap::value == true ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::is_always_equal::value == false ));
BOOST_STATIC_ASSERT(( boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( boost::container::allocator_traits
< ComplexAllocator<int> >::is_partially_propagable::value == true ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::rebind_traits<double>::allocator_type
, ComplexAllocator<double> >::value ));
BOOST_STATIC_ASSERT(( is_same<boost::container::allocator_traits
BOOST_CONTAINER_STATIC_ASSERT(( is_same<boost::container::allocator_traits
< ComplexAllocator<int> >::rebind_alloc<double>::value_type
, double >::value ));