Converted katina to c++98 (untested)