cpp: implement basic infrastructure for formatter settings