Refactored C++11-only code for C++98-also.