cpp: generate forward declarations for services