s3ext: fix C++ 98 compliance issues
The clang in mac does not check the -std=c++98 flag strictly.
Hence when compiling on the other platform like redhat 7 (using gcc),
the source code may not be compiled correctly. The compiling errors have
been fixed and the tests have been passed on redhat7 using c++98.
1. std::vector<T>::shrink_to_fit is added in C++11.
2. need to include <stdexcept> to use std::runtime_error.
3. In C++98, if a class has reference member, then it can't be copy assigned by default,
we need to implement operator= explicitly.
4. stoi is added in C++11.
Signed-off-by: NHaozhou Wang <hawang@pivotal.io>
Showing
想要评论请 注册 或 登录