https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121918
Bug ID: 121918
Summary: [C++26] optional<function_ref<S>> should be as large
as function_ref<S>
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: lichray at gmail dot com
Target Milestone: ---
Although not required by the standard, since function_ref<S> is not a nullable
type, optional<function_ref<S>> is demanded, which happens to be semantically
precise and monadic. But this specialization cannot be added "later" as that
would be an ABI break (for the same reason we can specialize optional<T&> but
not optional<reference_wrapper<T>>).