Both Clang and GCC can check printf-style functions for mismatches between their format strings and their arguments. For example, they'll complain about statements like this:
printf("Hello, %s!\n");
Does anything similar exist for Boost.Format? In other words, are there any compiler switches, static analysis tools, etc. that can warn about code like
std::string s1 = str(boost::format("Hello, %s!"));
or
std::string s2 = str(boost::format("Hello, %s!") % "John" % "Doe");
Looks like it is not supported A ticket has been created on boost as well to track it. You may want to pick up trunk version if you really need it.