|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
C++20 concepts hub: comparison, BST policy, and Aleph container concepts. More...
#include <concepts>#include <type_traits>#include <cstddef>#include <functional>#include <utility>Go to the source code of this file.
Classes | |
| struct | Aleph::concepts_detail::defer< T, Deferred > |
T itself, made dependent on Deferred. More... | |
| struct | Aleph::concepts_detail::traverse_arg< Container, Deferred > |
What Container::Iterator::get_curr() yields, deferred. More... | |
| struct | Aleph::concepts_detail::invoke_as< R(A...)> |
Calls a callable exactly as std::function<R(A...)> would. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
| namespace | Aleph::concepts_detail |
Concepts | |
| concept | Aleph::BinaryPredicate |
A callable that takes two const T& and returns bool. | |
| concept | Aleph::StrictWeakOrder |
| Strict weak ordering constraint for BST comparators. | |
| concept | Aleph::EqualityComparator |
| Equivalence relation constraint for equality comparators. | |
| concept | Aleph::BSTPolicy |
Concept for BST tree policies used by DynSetTree. | |
| concept | Aleph::AlephArrayConvertible |
| Concept that identifies types that can be converted or used as an Aleph Array. | |
| concept | Aleph::AlephSequentialContainer |
| Concept for Aleph-w mutable sequential containers. | |
| concept | Aleph::AlephSequentialIterableContainer |
| Concept for Aleph-w sequential containers that can be iterated. | |
| concept | Aleph::AlephIterator |
| An Aleph cursor-style iterator, as generic library code uses it. | |
| concept | Aleph::AlephIterable |
A type that yields an AlephIterator over its Item_Types. | |
| concept | Aleph::AlephTraversable |
A container whose items can be visited with traverse(). | |
| concept | Aleph::AlephIterableContainer |
A traversable, AlephIterable container with a size. | |
| concept | Aleph::AlephSequence |
An iterable container that grows at its back with append(). | |
| concept | Aleph::StlIterableContainer |
A container with STL-style begin()/end() and value_type. | |
| concept | Aleph::IntegerSortableValue |
| Integral value accepted by linear-time integer sorting algorithms. | |
| concept | Aleph::ArrayStorable |
| An element type the Aleph arrays can store. | |
| concept | Aleph::ClosedBinaryOp |
A binary functor closed over T. | |
| concept | Aleph::StaticMonoid |
A static monoid: M::identity() and M::combine(a, b). | |
| concept | Aleph::CallableWith |
f(args...) is a valid call expression, exactly as written. | |
| concept | Aleph::PredicateWith |
f(args...) is a valid call whose result is usable as a condition. | |
| concept | Aleph::concepts_detail::BinNodeLikeImpl |
Unqualified form of BinNodeLike, applied to a cv-free node type. | |
| concept | Aleph::BinNodeLike |
A binary tree node usable by tpl_binNodeUtils.H. | |
| concept | Aleph::RankedBinNodeLike |
| A binary tree node that also keeps subtree sizes (rank). | |
C++20 concepts hub: comparison, BST policy, and Aleph container concepts.
Defines twenty-one concepts used throughout Aleph-w to constrain template parameters (graph concepts live in ah-graph-concepts.H):
f(a, b) returns something convertible to bool.std::strict_weak_order for BST comparators, invoked the way BST classes actually call them: through a const F&.std::equivalence_relation for hash table equality comparators, likewise invoked through const F&.Tree<Key, Compare> instantiation must expose to be usable by DynSetTree.Item_Type and get_it().size, is_empty, append, mutable_for_each).const-iterable get_it().bool.Array, MemArray and DynArray can allocate (new T[n]) and grow (by moving elements).f(a, b) on two const T& returns something convertible to T (segment/Fenwick/sparse tables).M::identity() and M::combine(a, b).f(args...) is valid exactly as written.f(args...) is valid and usable as a condition (contextual conversion to bool).getL, getR, get_key, NullPtr).BinNodeLike plus subtree sizes.has_curr, get_curr, next_ne), AlephIterable<C> (yields one built from the container, Iterator(c)), AlephTraversable<C> (traverse), AlephIterableContainer<C> (both, plus size/is_empty), AlephSequence<C> (plus append), and StlIterableContainer<C> (begin/end/value_type).Using distinct concept names produces clear error messages: a BST constraint failure mentions "StrictWeakOrder", while a hash table failure mentions "EqualityComparator".
Definition in file ah-concepts.H.