https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92727
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to David Brown from comment #6) > I can see it is a challenge to get enough detail in the messages to be good > for the more advanced users, and still simple enough and clear enough for > more casual or inexperienced users. > > The static assertion looks good to me, and is clearly the easiest way to > implement such a feature. But I appreciate that it would not be ideal for > some people, and would hide useful messages from them. I disagree. The static assert contains all you need to know, expert or not. The benefit of seeing all the gory details is to figure out why something didn't compile, and what (possibly implicit) requirement your code failed to meet. If the maintainer of the library explicitly spelled out that requirement with a static_assert, then there's no need to see any more detail, because there's no need to infer the requirement from the code. Unfortunately that nice diagnostic from the static_assert turns into a total mess in C++20 mode, see Bug 92193 comment 2. My preference for this bug would be to reassign it to libstdc++ and hope that people pick up the baton and submit patches to add static_assert in places where it improves the user experience. That can be done piecemeal, and improved over time.