WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
wpi::memory::segregator< Allocators > Class Template Reference

Creates multiple nested binary_segregator. More...

#include <wpi/memory/segregator.hpp>

Inheritance diagram for wpi::memory::segregator< Allocators >:

Related Symbols

(Note that these are not member symbols.)

template<std::size_t I, class Segregator >
using segregatable_allocator_type = typename detail::segregatable_type<I, Segregator>::type
 The type of the Ith Segregatable.
 
template<class Segregator >
using fallback_allocator_type = typename detail::fallback_type<Segregator>::type
 The type of the final fallback RawAllocator.
 
template<typename... Args>
auto make_segregator (Args &&... args) -> segregator< typename std::decay< Args >::type... >
 

Detailed Description

template<class... Allocators>
class wpi::memory::segregator< Allocators >

Creates multiple nested binary_segregator.

If you pass one type, it must be a Segregatable. Then the result is a binary_segregator with that Segregatable and null_allocator as fallback. If you pass two types, the first one must be a Segregatable, the second one a RawAllocator. Then the result is a simple binary_segregator with those arguments. If you pass more than one, the last one must be a RawAllocator all others Segregatable, the result is binary_segregator<Head, segregator<Tail...>>.

Note
It will result in an allocator that tries each Segregatable in the order specified using the last parameter as final fallback.

Friends And Related Symbol Documentation

◆ fallback_allocator_type

template<class... Allocators>
template<class Segregator >
using fallback_allocator_type = typename detail::fallback_type<Segregator>::type
related

The type of the final fallback RawAllocator.

◆ make_segregator()

template<typename... Args>
auto make_segregator ( Args &&... args) -> segregator<typename std::decay<Args>::type...>
related
Returns:
A segregator created from the allocators args.

◆ segregatable_allocator_type

template<class... Allocators>
template<std::size_t I, class Segregator >
using segregatable_allocator_type = typename detail::segregatable_type<I, Segregator>::type
related

The type of the Ith Segregatable.


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