https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69005
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Hmm, __and_ is supposed to shortcut, but the way I use it here doesn't take advantage of that because _Invoke is always instantiated even when _NotSelf is false. Replacing is_same<_Invoke<...>, ...> with something that only evaluates the decltype expression as needed should work.