c++ 11, practice 4.8