Commit b185f2f0 authored by Steffen Müthing's avatar Steffen Müthing

[Interface] Add freestanding type aliases for node tags

This patch adds freestanding template aliases NodeTag<Node> and
ImplementationTag<Node>. This improves readability and allows a future
extension to nodes that do not carry the nested tag types (by
introducing an intermediate dispatch mechanism). But for now, it's just
about readability...
parent fb38adaf
......@@ -5,6 +5,7 @@
#include <cstddef>
#include <type_traits>
#include <dune/common/documentation.hh>
......@@ -56,6 +57,14 @@ namespace Dune {
typedef ImplementationDefined NodeStorage;
//! Returns the node tag of the given Node.
template<typename Node>
using NodeTag = typename std::decay_t<Node>::NodeTag;
//! Returns the implementation tag of the given Node.
template<typename T>
using ImplementationTag = typename std::decay_t<T>::ImplementationTag;
//! \} group Nodes
} // namespace TypeTree
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment