14 void algorithm_signed(int i
) { /* [..] */ cout
<< "process a signed integer" << endl
; }
15 void algorithm_unsigned(unsigned) { /* [..] */ cout
<< "process an unsigned integer" << endl
; }
20 if constexpr (is_signed
<T
>::value
)
22 else if constexpr (is_unsigned
<T
>::value
)
23 algorithm_unsigned(t
);
25 static_assert(is_signed
<T
>::value
|| is_unsigned
<T
>::value
, "Must be signed or unsigned");
31 typename remove_reference
<T
>::type
&& move(T
&& arg
)
33 return static_cast<typename remove_reference
<T
>::type
&&>(arg
);
39 cout
<< "Is the type 'C' a floating point?: " << is_floating_point
<C
>::value
<< endl
;
40 cout
<< "Is the type 'float' a floating point?: " << is_floating_point
<float>::value
<< endl
;
41 cout
<< "Is the type 'int' a floating point?:" << is_floating_point
<int>::value
<< endl
;
45 // algorithm("hello"); Do not compile.