UserDB::{read,write}(): bool, Really?

void write(const std::string& filename, bool binary=true);
void read(const std::string& filename, bool binary=true);

Boolean parameters are forbidden (according to Uncle Bob).

  • Introduce an enum (enum class maybe), and pass that instead

  • Eliminate the default value

  • Show what switch can do for you, provided you don’t put a default: label.