Dune Core Modules (2.8.0)

Dune::PriorityTag< priority > Struct Template Reference

Helper class for tagging priorities. More...

#include <dune/common/typeutilities.hh>

Detailed Description

template<std::size_t priority>
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
priorityThe priority of this tag.


The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)