ZeroErr
|
rank is a helper class for Printer to define the priority of overloaded functions. More...
#include <print.h>
rank is a helper class for Printer to define the priority of overloaded functions.
N | the 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.