https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102065
Bug ID: 102065
Summary: [C++20] Substitution failure of function instantiates
its argument
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102065
--- Comment #2 from Egor Seredin ---
Thank you! I agree that it is a duplicate.
Also, there is 3rd workaround without guards (may be with implicit guards):
move last function argument to last template argument:
https://godbolt.org/#z:OYLghAFBqd5