WPILibC++ 2025.3.2
Loading...
Searching...
No Matches
wpi::memory::propagation_traits< joint_allocator > Struct Reference

Specialization of the propagation_traits for the joint_allocator. More...

#include <wpi/memory/joint_allocator.hpp>

Public Types

using propagate_on_container_swap = std::false_type
 
using propagate_on_container_move_assignment = std::false_type
 
using propagate_on_container_copy_assignment = std::false_type
 

Static Public Member Functions

template<class AllocReference >
static AllocReference select_on_container_copy_construction (const AllocReference &)
 

Detailed Description

Specialization of the propagation_traits for the joint_allocator.

A joint allocator does not propagate on assignment and it is not allowed to use the regular copy/move constructor of allocator aware containers, instead it needs the copy/move constructor with allocator.

Note
This is required because the container constructor will end up copying/moving the allocator. But this is not allowed as you need the allocator with the correct joined memory. Copying can be customized (i.e. forbidden), but sadly not move, so keep that in mind.

Member Typedef Documentation

◆ propagate_on_container_copy_assignment

using wpi::memory::propagation_traits< joint_allocator >::propagate_on_container_copy_assignment = std::false_type

◆ propagate_on_container_move_assignment

using wpi::memory::propagation_traits< joint_allocator >::propagate_on_container_move_assignment = std::false_type

◆ propagate_on_container_swap

using wpi::memory::propagation_traits< joint_allocator >::propagate_on_container_swap = std::false_type

Member Function Documentation

◆ select_on_container_copy_construction()

template<class AllocReference >
static AllocReference wpi::memory::propagation_traits< joint_allocator >::select_on_container_copy_construction ( const AllocReference & )
inlinestatic

The documentation for this struct was generated from the following file: