add two versions of Adapter in C++