Skip to content

Commit 6e627fb

Browse files
author
Julian LALU
committed
Update hashset
1 parent 3c41bcc commit 6e627fb

File tree

6 files changed

+331
-271
lines changed

6 files changed

+331
-271
lines changed

interface/core/allocators/aligned_heap_allocator.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ namespace hud
4646
struct allocator_traits<aligned_heap_allocator<alignment>>
4747
{
4848
using is_always_equal = hud::true_type;
49-
using copy_when_container_copy = hud::false_type;
50-
using move_when_container_move = hud::false_type;
49+
using copy_when_container_copy_assigned = hud::false_type;
50+
using move_when_container_move_assigned = hud::false_type;
5151
using swap_when_container_swap = hud::false_type;
5252
};
5353

5454
static_assert(hud::allocator_traits<aligned_heap_allocator<8>>::is_always_equal::value);
55-
static_assert(!hud::allocator_traits<aligned_heap_allocator<8>>::copy_when_container_copy::value);
56-
static_assert(!hud::allocator_traits<aligned_heap_allocator<8>>::move_when_container_move::value);
55+
static_assert(!hud::allocator_traits<aligned_heap_allocator<8>>::copy_when_container_copy_assigned::value);
56+
static_assert(!hud::allocator_traits<aligned_heap_allocator<8>>::move_when_container_move_assigned::value);
5757
static_assert(!hud::allocator_traits<aligned_heap_allocator<8>>::swap_when_container_swap::value);
5858

5959
} // namespace hud

interface/core/allocators/allocator_traits.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ namespace hud
2424
* If `hud::true_type`, the allocator is copy-assigned when the container is copy-assigned.
2525
*/
2626

27-
using copy_when_container_copy = hud::true_type;
27+
using copy_when_container_copy_assigned = hud::true_type;
2828

2929
/**
3030
* Indicates whether `allocator_t` should never be move-assigned when the container is move-assigned.
3131
* If `hud::false_type`, the allocator should never be move-assigned.
3232
* If `hud::true_type`, the allocator is move-assigned when the container is move-assigned.
3333
*/
3434

35-
using move_when_container_move = hud::true_type;
35+
using move_when_container_move_assigned = hud::true_type;
3636

3737
/**
3838
* Indicates whether `allocator_t` should be swapped with `hud::swap` when the container is swapped.

interface/core/allocators/heap_allocator.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ namespace hud
4141
struct allocator_traits<heap_allocator>
4242
{
4343
using is_always_equal = hud::true_type;
44-
using copy_when_container_copy = hud::false_type;
45-
using move_when_container_move = hud::false_type;
44+
using copy_when_container_copy_assigned = hud::false_type;
45+
using move_when_container_move_assigned = hud::false_type;
4646
using swap_when_container_swap = hud::false_type;
4747
};
4848

4949
static_assert(hud::allocator_traits<heap_allocator>::is_always_equal::value);
50-
static_assert(!hud::allocator_traits<heap_allocator>::copy_when_container_copy::value);
51-
static_assert(!hud::allocator_traits<heap_allocator>::move_when_container_move::value);
50+
static_assert(!hud::allocator_traits<heap_allocator>::copy_when_container_copy_assigned::value);
51+
static_assert(!hud::allocator_traits<heap_allocator>::move_when_container_move_assigned::value);
5252
static_assert(!hud::allocator_traits<heap_allocator>::swap_when_container_swap::value);
5353
} // namespace hud
5454

interface/core/containers/array.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,8 @@ namespace hud
12271227
template<typename u_type_t>
12281228
constexpr void move_assign(array<u_type_t, allocator_t> &&other, const usize min_slack = 0) noexcept
12291229
{
1230-
// Move the allocator. This will do nothing if hud::allocator_traits<allocator_t>::move_when_container_move is hud::false_type
1231-
if constexpr (hud::allocator_traits<allocator_t>::move_when_container_move::value)
1230+
// Move the allocator. This will do nothing if hud::allocator_traits<allocator_t>::move_when_container_move_assigned is hud::false_type
1231+
if constexpr (hud::allocator_traits<allocator_t>::move_when_container_move_assigned::value)
12321232
{
12331233
allocator_() = std::move(other.allocator_());
12341234
}

0 commit comments

Comments
 (0)