If you use old c++ standard - all is fine. Problem appears only with c++11.
Patched version will compile with old standard and will not influence speed or something else (in fact hidden cast becomes not hidden :) )