Add quaternary lift in C++ implementation.