Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::stl_detail Namespace Reference

Classes

struct  has_reverse_iterators
 Detect if a container has reverse iterators. More...
 
struct  has_size
 Detect if a type has a size() method. More...
 
struct  is_std_hashable
 Detect if a type is hashable via std::hash. More...
 

Functions

template<typename Container >
size_t safe_size (const Container &c)
 Helper to get container size safely (returns 0 for containers without size())
 
template<typename Result , typename Container >
void try_reserve (Result &result, const Container &c)
 Helper to reserve if possible.
 
template<typename Result >
void try_reserve_n (Result &result, size_t n)
 Helper to reserve with a specific size if the result supports it.
 

Variables

constexpr size_t ADAPTIVE_THRESHOLD = 64
 Threshold for switching from linear to hash-based algorithms.
 
template<typename T >
constexpr bool has_size_v = has_size<T>::value
 
template<typename T >
constexpr bool is_std_hashable_v = is_std_hashable<T>::value
 
template<typename T >
constexpr bool has_reverse_iterators_v = has_reverse_iterators<T>::value
 

Function Documentation

◆ safe_size()

template<typename Container >
size_t Aleph::stl_detail::safe_size ( const Container &  c)

Helper to get container size safely (returns 0 for containers without size())

Definition at line 127 of file ah-stl-functional.H.

References Aleph::blossom_maximum_cardinality_matching().

Referenced by Aleph::stl_distinct(), Aleph::stl_group_by(), and Aleph::stl_take_last().

◆ try_reserve()

template<typename Result , typename Container >
void Aleph::stl_detail::try_reserve ( Result &  result,
const Container &  c 
)

◆ try_reserve_n()

template<typename Result >
void Aleph::stl_detail::try_reserve_n ( Result &  result,
size_t  n 
)

Helper to reserve with a specific size if the result supports it.

Definition at line 145 of file ah-stl-functional.H.

Variable Documentation

◆ ADAPTIVE_THRESHOLD

constexpr size_t Aleph::stl_detail::ADAPTIVE_THRESHOLD = 64
inlineconstexpr

Threshold for switching from linear to hash-based algorithms.

Definition at line 98 of file ah-stl-functional.H.

Referenced by Aleph::stl_distinct(), and Aleph::stl_group_by().

◆ has_reverse_iterators_v

template<typename T >
constexpr bool Aleph::stl_detail::has_reverse_iterators_v = has_reverse_iterators<T>::value
inlineconstexpr

Definition at line 123 of file ah-stl-functional.H.

◆ has_size_v

template<typename T >
constexpr bool Aleph::stl_detail::has_size_v = has_size<T>::value
inlineconstexpr

Definition at line 105 of file ah-stl-functional.H.

◆ is_std_hashable_v

template<typename T >
constexpr bool Aleph::stl_detail::is_std_hashable_v = is_std_hashable<T>::value
inlineconstexpr

Definition at line 112 of file ah-stl-functional.H.