You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#3 is ambiguous because neither overload is a better match, even if #2 is more constrained
This is because constraints are checked only if all the parameter are the same:
In [over.match.best.general]/2.6, we say
F1 and F2 are non-template functions with the same parameter-type-lists, and F1 is more constrained than F2 according to the partial ordering of constraints described in [temp.constr.order]
We probably want to limit to non objects parameters
Proposed resolution
Modify [over.match.best.general]/2.6
F1 and F2 are non-template functions with the same parameter-type-listsnon-object parameters, and F1 is more constrained than F2 according to the partial ordering of constraints described in [[temp.constr.order]], or if not that,(https://eel.is/c++draft/temp.constr.order)