Go to the documentation of this file.
26 #include <boost/test/unit_test.hpp>
32 #include <type_traits>
71 #ifdef TSL_RH_NO_EXCEPTIONS
74 throw std::bad_alloc();
84 return std::numeric_limits<size_type>::max() /
sizeof(
value_type);
87 template <
typename U,
typename... Args>
89 ::new (
static_cast<void*
>(p)) U(std::forward<Args>(args)...);
98 template <
class T,
class U>
103 template <
class T,
class U>
119 BOOST_AUTO_TEST_SUITE(test_custom_allocator)
129 const int nb_elements = 1000;
130 for (
int i = 0; i < nb_elements; i++) {
138 BOOST_AUTO_TEST_SUITE_END()
const_pointer address(const_reference x) const noexcept
void construct(U *p, Args &&... args)
bool operator==(const custom_allocator< T > &, const custom_allocator< U > &)
pointer address(reference x) const noexcept
pointer allocate(size_type n, const void *=0)
std::pair< iterator, bool > insert(const value_type &value)
bool_constant< true > true_type
std::true_type propagate_on_container_move_assignment
static std::size_t nb_custom_allocs
void deallocate(T *p, size_type)
std::ptrdiff_t difference_type
const T & const_reference
custom_allocator(const custom_allocator< U > &)
size_type max_size() const noexcept
custom_allocator()=default
BOOST_AUTO_TEST_CASE(test_custom_allocator_1)
bool operator!=(const custom_allocator< T > &, const custom_allocator< U > &)
mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:45:57