Dune Core Modules (unstable)
Helper class for tagging priorities. More...
#include <dune/common/typeutilities.hh>
Detailed Description
struct Dune::PriorityTag< priority >
Helper class for tagging priorities.
When using multiple overloads of a function where some are removed from the overload set via SFINAE, the remaining overloads may be ambiguous. A prototypic example would be a default overload that should be used if the others do not apply.
By adding additional arguments of type PriorityTag<k>
with increasing priority k to all overloads and calling the method with PriorityTag<m>
where m is larger or equal to the maximal used priority, those can be made unambiguous.
In this case the matching overload with highest priority will be used. This is achieved by the fact that PriorityTag<k>
derives from all types PriorityTag<i>
with i less than k.
- Template Parameters
-
priority The priority of this tag.
The documentation for this struct was generated from the following file:
- dune/common/typeutilities.hh