cpp: try to fix build break on visitor tests