A CCM implementation in C++