An extensible flag handler for c++ programs