https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85965
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- There's nothing that can be done here. The error comes from the library (not the compiler) and there's no way the compiler can possibly say "the static assertion would have passed if the __is_invocable trait had been true, which might have happened if the type was complete so that a conversion sequence from const Biz* to const Bar* might be possible". The is_invocable trait asks if that function object can be called with those arguments, and when Biz is incomplete the answer is no. I think sadly I have to remove that static_assertion, or just make it happen later when the comparison function is used (by which point either the call works, or you get an error anyway and the static assertion doesn't add any value).