ARTICLE AD BOX
The seemingly obvious solution is to use std::constant_wrapper from [P2781R9]. The option to use std::constant_wrapper as a replacement for std::nontype was discussed during an LEWG telecon 2025-03-11.
In short, the problems stem from the fact that std::constant_wrapper is already invocable; it already has a call operator, whose semantics would be ignored by std::function_ref, in a way that is inconsistent with how std::constant_wrapper behaves anywhere else.
More details can be found in [P3740R1], as well as in [P3792R0] "Why constant_wrapper is not a usable replacement for nontype".
In any case, LEWG already decided (with paper-thin consensus) not to pursue this path.
TL;DR: It was considered, but there are reasons to keep the two separate.
