|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Classes | |
| struct | has_reverse_iterators |
| Detect if a container has reverse iterators. More... | |
| struct | has_reverse_iterators< T, std::void_t< decltype(std::declval< T >().rbegin()), decltype(std::declval< T >().rend())> > |
| struct | has_size |
| Detect if a type has a size() method. More... | |
| struct | has_size< T, std::void_t< decltype(std::declval< T >().size())> > |
| struct | is_std_hashable |
| Detect if a type is hashable via std::hash. More... | |
| struct | is_std_hashable< T, std::void_t< decltype(std::hash< T >{}(std::declval< T >()))> > |
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 |
Helper to get container size safely (returns 0 for containers without size())
Definition at line 137 of file ah-stl-functional.H.
References Aleph::maps().
Referenced by Aleph::stl_distinct(), Aleph::stl_group_by(), and Aleph::stl_take_last().
Helper to reserve if possible.
Definition at line 147 of file ah-stl-functional.H.
References Aleph::maps().
Referenced by Aleph::stl_enumerate_to_pairs(), Aleph::stl_map(), Aleph::stl_mapi(), and Aleph::stl_unzip_pairs().
Helper to reserve with a specific size if the result supports it.
Definition at line 155 of file ah-stl-functional.H.
Threshold for switching from linear to hash-based algorithms.
Definition at line 97 of file ah-stl-functional.H.
Referenced by Aleph::stl_distinct(), and Aleph::stl_group_by().
|
inlineconstexpr |
Definition at line 133 of file ah-stl-functional.H.
Definition at line 108 of file ah-stl-functional.H.
|
inlineconstexpr |
Definition at line 120 of file ah-stl-functional.H.