ZeroErr
zeroerr::rank< N > Struct Template Reference

rank is a helper class for Printer to define the priority of overloaded functions. More...

#include <print.h>

Detailed Description

template<unsigned N>
struct zeroerr::rank< N >

rank is a helper class for Printer to define the priority of overloaded functions.

Template Parameters
Nthe priority of the rule. 0 is the lowest priority. The maximum priority is max_rank.

You can define a rule by adding it as a function parameter with rank<N> where N is the priority. For example: template<typename T> void Foo(T v, rank<0>); // lowest priority void Foo(int v, rank<1>); // higher priority

Even though in the first rule, type T can be an int, the second function will still be called due to the priority.


The documentation for this struct was generated from the following file: