c++ification and extension to two markers