Skip to content

Commit

Permalink
Merge pull request #317 from LLNL/feature/update_fb_allocator
Browse files Browse the repository at this point in the history
Remove propagate_on_* types and is_always_equal
  • Loading branch information
KIwabuchi authored Feb 14, 2024
2 parents 98fcc95 + 881239a commit 16b09d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
13 changes: 0 additions & 13 deletions include/metall/utility/fallback_allocator_adaptor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ class fallback_allocator_adaptor {
typename primary_allocator_type::const_void_pointer;
using difference_type = typename primary_allocator_type::difference_type;
using size_type = typename primary_allocator_type::size_type;
using propagate_on_container_copy_assignment = std::true_type;
using propagate_on_container_move_assignment = std::true_type;
using propagate_on_container_swap = std::true_type;
using is_always_equal = std::false_type;

/// \brief Makes another allocator type for type T2
template <typename T2>
Expand Down Expand Up @@ -205,15 +201,6 @@ class fallback_allocator_adaptor {
}
}

/// \brief Obtains the copy-constructed version of the allocator a.
/// \param a Allocator used by a standard container passed as an argument to a
/// container copy constructor. \return The allocator to use by the
/// copy-constructed standard containers.
fallback_allocator_adaptor select_on_container_copy_construction(
const fallback_allocator_adaptor &a) {
return fallback_allocator_adaptor(a);
}

// ---------- This class's unique public functions ---------- //
primary_allocator_type &primary_allocator() { return m_primary_allocator; }

Expand Down
32 changes: 0 additions & 32 deletions test/container/fallback_allocator_adaptor_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,38 +66,6 @@ TEST(FallbackAllocatorAdaptorTest, Types) {
GTEST_ASSERT_EQ(typeid(std::allocator_traits<fb_alloc_type<T>>::size_type),
typeid(fb_alloc_type<T>::size_type));

GTEST_ASSERT_EQ(
typeid(std::allocator_traits<
fb_alloc_type<T>>::propagate_on_container_copy_assignment),
typeid(fb_alloc_type<T>::propagate_on_container_copy_assignment));
GTEST_ASSERT_EQ(
typeid(std::allocator_traits<
fb_alloc_type<T>>::propagate_on_container_copy_assignment),
typeid(std::true_type));

GTEST_ASSERT_EQ(
typeid(std::allocator_traits<
fb_alloc_type<T>>::propagate_on_container_move_assignment),
typeid(fb_alloc_type<T>::propagate_on_container_move_assignment));
GTEST_ASSERT_EQ(
typeid(std::allocator_traits<
fb_alloc_type<T>>::propagate_on_container_move_assignment),
typeid(std::true_type));

GTEST_ASSERT_EQ(typeid(std::allocator_traits<
fb_alloc_type<T>>::propagate_on_container_swap),
typeid(fb_alloc_type<T>::propagate_on_container_swap));
GTEST_ASSERT_EQ(typeid(std::allocator_traits<
fb_alloc_type<T>>::propagate_on_container_swap),
typeid(std::true_type));

GTEST_ASSERT_EQ(
typeid(std::allocator_traits<fb_alloc_type<T>>::is_always_equal),
typeid(fb_alloc_type<T>::is_always_equal));
GTEST_ASSERT_EQ(
typeid(std::allocator_traits<fb_alloc_type<T>>::is_always_equal),
typeid(std::false_type));

using otherT = int;
using other_alloc_t = fb_alloc_type<otherT>;
GTEST_ASSERT_EQ(
Expand Down

0 comments on commit 16b09d3

Please sign in to comment.