Content deleted Content added
Reformat code, add rank_v and fix rankof |
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags |
||
Line 7:
The box below instead shows how ''rank of a type'' and ''rank of an array expression'' could be defined (in a semi-formal style) for C++ and illustrates a simple way to calculate them at compile time.
<
#include <type_traits>
#include <cstddef>
Line 44:
return rank_v<unqualified_t<T>>;
}
</syntaxhighlight>
Given the code above the rank of a type T can be calculated at compile time by
:<
or the shorter form
:<
Calculating the rank of an expression can be done using
:<
==See also==
|