This is an archive of the discontinued LLVM Phabricator instance.

Prefer functions with true enable_if conditions when attempting to resolve the address of an overload
ClosedPublic

Authored by george.burgess.iv on Oct 15 2015, 5:43 PM.

Details

Summary

Our overload resolution logic considers some candidate A better than some candidate B if the set of A's enable_if conditions is a strict superset of the set of B's enable_if conditions.

Our address-of overload resolution logic does not.

This is suboptimal.

This patch updates the address-of overload resolution logic to behave more like the regular overload resolution logic.

Diff Detail

Repository
rL LLVM

Event Timeline

george.burgess.iv retitled this revision from to Prefer functions with true enable_if conditions when attempting to resolve the address of an overload.
george.burgess.iv updated this object.
george.burgess.iv added a reviewer: rsmith.
george.burgess.iv added a subscriber: cfe-commits.
rsmith accepted this revision.Oct 15 2015, 5:52 PM
rsmith edited edge metadata.

Looks great, thanks!

lib/Sema/SemaOverload.cpp
8413–8414 ↗(On Diff #37545)

... and Cand1 has more than N enable_if attributes.

This revision is now accepted and ready to land.Oct 15 2015, 5:52 PM
This revision was automatically updated to reflect the committed changes.