port to C++11