This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] LWG2420 bits for bind<void>
ClosedPublic

Authored by K-ballo on Jul 7 2015, 8:21 AM.

Details

Summary

Implemented LWG2420 bits for bind<void>

Diff Detail

Event Timeline

K-ballo updated this revision to Diff 29181.Jul 7 2015, 8:21 AM
K-ballo retitled this revision from to [libcxx] LWG2420 bits for bind<void>.
K-ballo updated this object.
K-ballo added reviewers: mclow.lists, EricWF.
K-ballo added a subscriber: cfe-commits.
EricWF accepted this revision.Jul 7 2015, 1:49 PM
EricWF edited edge metadata.

LGTM. I don't think we need any changes in __functional_03 because we don't provide bind in 03 :)

include/__functional_03
2095

Small nit about the existing code: base is not a reserved identify and I don't know if it is safe to use.

include/functional
2188

We could probably save a bunch of SFINAE here by using __lazy_or and putting the is_void check first. However I'm not sure that could hide errors caused by not evaluating __bind_return. Thoughts?

This revision is now accepted and ready to land.Jul 7 2015, 1:49 PM

I don't think we need any changes in __functional_03 because we don't provide bind in 03 :)

The changes in __functional_03 apply to commented out code. I added those just for the sake of completeness, although I doubt there will ever be an '03 bind. There'd be no harm in dropping them.

include/functional
2188

IIUC, __bind_return is SFINAE-ing out on a resulting ill-formed INVOKE expression. Strictly speaking I don't think it is required, but since it's already there I'd rather be consistent.

EricWF added a comment.Jul 7 2015, 6:44 PM

I doubt there will ever be an '03 bind.

Only over my dead body. I've been meaning to remove that code for a while now. I'll probably tear it out tonight.

Can I commit this for you?

Can I commit this for you?

Sure, thanks.

EricWF closed this revision.Jul 10 2015, 4:29 PM

Committed in r241967.