MSVC is not able to eliminate the function even when the functor used is Null_functor that has no result_type.