Implemented LWG2420 bits for bind<void>
Details
Diff Detail
Event Timeline
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? | |
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. | |
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?
Small nit about the existing code: base is not a reserved identify and I don't know if it is safe to use.