In our codebase, static_assert(std::some_type_trait<Ts...>::value, "msg")
(where some_type_trait is an std type_trait and Ts... is the
appropriate template parameters) account for 11.2% of the static_asserts.
In these cases, the Ts are typically not spelled out explicitly, e.g.
static_assert(std::is_same<SomeT::TypeT, typename SomeDependentT::value_type>::value, "message");
The diagnostic when the assert fails is typically not very useful, e.g.
static_assert failed due to requirement 'std::is_same<SomeT::TypeT, typename SomeDependentT::value_type>::value' "message"
This change makes the diagnostic spell out the types explicitly , e.g.
static_assert failed due to requirement 'std::is_same<int, float>::value' "message"
See tests for more examples.
After this is submitted, I intend to handle
static_assert(!std::some_type_trait<Ts...>::value, "msg"),
which is another 6.6% of static_asserts.
Peanut gallery says: Should ResolveTemplateArguments really be here, or should it be a property of the PrintingPolicy the same way e.g. ConstantsAsWritten is a property of the PrintingPolicy? I don't know what a PrintingPolicy is, really, but I know that I hate defaulted boolean function parameters with a passion. ;)
Furthermore, I note that the doc-comment for ConstantsAsWritten, at line ~207 of include/clang/AST/PrettyPrinter.h, is nonsensical and maybe someone should give it some love. (That is totally not your problem, though.)