int1_type x = ...;
int2_type y;
if ([check whether the current value of x will fit into y]) {
y = x;
}
Is there a generic way to check if the current value of x will fit into y (eg. long x = 1; char y = x;) when their types depend on platform and/or template specializations?