|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Typedefs | |
| template<class Node > | |
| using | key_of_t = std::remove_cvref_t< decltype(std::declval< Node & >().get_key())> |
The type of the key of a node, as its get_key() gives it. | |
Functions | |
| template<class Node > | |
| Node | header_from (Node &other) noexcept(nothrow_header_from_v< Node >) |
| Builds a header node of a tree that takes the nodes of another tree. | |
| template<class Compare > | |
| constexpr decltype(auto) | compare_to_take (Compare &cmp) noexcept |
| What a tree that takes the nodes of another takes of its comparison criteria. | |
Variables | |
| template<typename Key > | |
| constexpr bool | nothrow_default_key_v |
Whether building a Key by default throws nothing. | |
| template<class Node > | |
| constexpr bool | nothrow_from_key_of_v |
| Whether a node is built without throwing from the key of another node, which is moved. | |
| template<class Node > | |
| constexpr bool | nothrow_header_from_v |
| Whether header_from() builds a header node without throwing. | |
| template<class Compare > | |
| constexpr bool | nothrow_compare_taken_v |
| Whether a tree takes without throwing the comparison criteria that compare_to_take() gives it. | |
| using Aleph::bin_node_detail::key_of_t = typedef std::remove_cvref_t<decltype(std::declval<Node &>().get_key())> |
The type of the key of a node, as its get_key() gives it.
| Node | The type of the nodes of a tree. |
Definition at line 157 of file tpl_binNode.H.
|
constexprnoexcept |
What a tree that takes the nodes of another takes of its comparison criteria.
The criteria to copy, from a const one if they have that copy, or else from one that is not const: the tree to move from keeps its own, and takes nodes again in the same order. Criteria that cannot be copied are moved, and that tree keeps criteria that were moved from.
| Compare | The type of the comparison criteria. |
| [in,out] | cmp | The comparison criteria of the tree to move from. |
cmp: a reference to const, or to non-const, to copy it, or an rvalue, to move it. Definition at line 242 of file tpl_binNode.H.
References cmp().
Builds a header node of a tree that takes the nodes of another tree.
A header node is a node, and so it holds a key, which no tree reads. A tree that is built empty builds that node by default, and with it its key and its control data. A tree that takes the place of another builds no key, if it can:
| Default construction of the node | Construction from the key of other, moved | The key of the header |
|---|---|---|
| cannot throw | any | built by default |
| may throw | cannot throw | that of other, moved |
| may throw | may throw | built by default |
The node built by default builds its key and its control data by default; the one built from a key builds its control data by default too. With the nodes of the library, whose control data are built without throwing, the rows go by the key: no key is built, and nothing is allocated, with a key whose default construction allocates and whose move does not, as an Array; and a key that is built by default without throwing is built as it always was. In the second row, other keeps a key that was moved from, which nobody reads either.
| Node | The type of the nodes of the tree. |
| [in,out] | other | The same header node of the tree to move from. |
Node::NullPtr and the control data of a node built by default. | What | the default construction of the node throws, in the third row: that of its key or of its control data. Nothing in the other two. |
Definition at line 217 of file tpl_binNode.H.
Referenced by TEST().
|
inlineconstexpr |
Whether a tree takes without throwing the comparison criteria that compare_to_take() gives it.
| Compare | The type of the comparison criteria of a tree. |
Definition at line 257 of file tpl_binNode.H.
|
inlineconstexpr |
Whether building a Key by default throws nothing.
A std::pair, the key of the nodes of a map, is looked into: its default constructor builds its two members by default and nothing else, but the one of libstdc++ is not declared noexcept, and those of libc++ and of the library of MSVC are.
| Key | The type of the key of a node. |
Definition at line 145 of file tpl_binNode.H.
|
inlineconstexpr |
Whether a node is built without throwing from the key of another node, which is moved.
Its get_key() and its construction from a key that is moved cannot throw. Those of the nodes of the library cannot, but a node of the user may have a get_key() that throws.
| Node | The type of the nodes of a tree. |
Definition at line 169 of file tpl_binNode.H.
|
inlineconstexpr |
Whether header_from() builds a header node without throwing.
It does when the node is built by default without throwing, or when it is built without throwing from the key of another node.
| Node | The type of the nodes of a tree. |
Definition at line 181 of file tpl_binNode.H.