it should compile without static_cast