Dune Core Modules (2.6.0)
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 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