This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Make std::bind constexpr-friendly
ClosedPublic

Authored by ldionne on Apr 26 2023, 2:21 PM.

Details

Reviewers
Mordante
Group Reviewers
Restricted Project
Commits
rG13f5579caeee: [libc++] Make std::bind constexpr-friendly
Summary

std::bind is supposed to be constexpr-friendly since C++20 and it was
marked as such in our synopsis. However, the tests were not actually
testing any of it and as it happens, std::bind was not really constexpr
friendly. This fixes the issue and makes sure that at least some of the
tests are running in constexpr mode.

Some tests for std::bind check functions that return void, and those
use global variables. These tests haven't been made constexpr-friendly,
however the coverage added by this patch should be sufficient to get
decent confidence.

Diff Detail

Event Timeline

ldionne created this revision.Apr 26 2023, 2:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2023, 2:21 PM
ldionne requested review of this revision.Apr 26 2023, 2:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2023, 2:21 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision.Apr 27 2023, 9:58 AM
Mordante added a subscriber: Mordante.

LGTM! Did you check whether there needs to be a paper status updated?

This revision is now accepted and ready to land.Apr 27 2023, 9:58 AM

LGTM! Did you check whether there needs to be a paper status updated?

That would be P1065R2, which we claim to implement since Clang 12.

ldionne updated this revision to Diff 517624.Apr 27 2023, 10:07 AM

Try to trigger CI again

ldionne updated this revision to Diff 517918.Apr 28 2023, 7:38 AM

Rebase to trigger CI

ldionne updated this revision to Diff 518848.May 2 2023, 1:40 PM

Rebase for CI

This revision was landed with ongoing or failed builds.May 3 2023, 9:27 AM
This revision was automatically updated to reflect the committed changes.