[C++]: changes to support #9 for C++.