xieite ::type <>
Defined in header <xieite/meta/type.hpp>
"Groups" some types into singular "things". Especially useful for declaring parameters which are C-style arrays, function pointers, or function references.
Differs from
std ::type_identity_t <>
in that this does not prevent template parameter deduction (see example).Declaration
template <typename T >using type =T ;
Example
Output:template <typename Ret >void foo (xieite ::type <Ret (&)()>fn ) {fn (); }int bar () {std ::puts ("bar" );return 0 ; }float baz () {std ::puts ("baz" );return 0.0f ; }int main () {foo (bar );foo (baz ); }
[View in Compiler Explorer]bar baz