A port of Shen by C++