Looks short and compact, but requires static_cast<unsigned int> to cover T1 and T2 of different signess. Which doesn't look all that nice anymore. However, typecasting would only hide the warning. We want the warning to occur, to encourage us to sync types on template invocation instead. Signed-off-by: Simon Rozman <simon@rozman.si>
Languages
C++
100%