Merge branch 'feature/freestanding-degree-and-tag-functions' into 'master'
Add freestanding degree and tag functions This merge requests does two things: * Freestanding meta functions for accessing the `NodeTag` and `ImplementationTag`, which are called just like the tag that they extract. Just replace `typename Node::NodeTag` with `NodeTag<Node>`. This gets rid of a `typename` and improves readability as well as extensibility. The merge requests also switches all internal uses of those tags to the new meta functions. * More importantly, it gets rid of the horrible node member `CHILDREN`. This is actually a leftover from TypeTree's predecessor. The new canonical way of accessing the degree of a node is either: * If you have a node instance lying around and only need the run time information, you can simply write `TypeTree::degree(node)`. At the moment, the degree of all nodes is fixed at compile time, but this might change in the future. * If you need compile time information, you can use the new variable template `TypeTree::staticDegree<Node>`. This expression directly evaluates to the actual number. If you are instead interested in a type, you can use `TypeTree::StaticDegree<Node>` to obtain a `std::integral_constant<std::size_t,...>`. Internally, the default implementation forwards to a static member function `Node::degree()`, but this can be changed by overloading the dispatch mechanism on the node tag. * All internal uses of `Node::CHILDREN` have been replaced by calls to the new (meta) function. * `Node::CHILDREN` is **deprecated** and will be removed after the release of TypeTree 3.0. See merge request !10
Showing with 187 additions and 104 deletions