Improve c++ snippet (for_cpp11)