In #4025 there's attemption to strengthen the exception specification of _Ref_fn::operator().
Given the standard class template std::reference_wrapper is already a invocable wrapper and its operator() has a propagating exception specification (thanks to LWG-3764), it seems OK to replace the uses of _Ref_fn with reference_wrapper.
Pros:
- user codes should only use
reference_wrapper, so we might be able to instantiate less specializations.
Cons:
reference_wrapper is slightly heavier than _Ref_fn;
reference_wrapper is assignable, which might be unwanted for the internal details of the implementation.
In #4025 there's attemption to strengthen the exception specification of
_Ref_fn::operator().Given the standard class template
std::reference_wrapperis already a invocable wrapper and itsoperator()has a propagating exception specification (thanks to LWG-3764), it seems OK to replace the uses of_Ref_fnwithreference_wrapper.Pros:
reference_wrapper, so we might be able to instantiate less specializations.Cons:
reference_wrapperis slightly heavier than_Ref_fn;reference_wrapperis assignable, which might be unwanted for the internal details of the implementation.