This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Remove redundant __invoke_constexpr functions
ClosedPublic

Authored by philnik on Apr 3 2022, 12:53 PM.

Details

Summary

There are constexpr versions for the different __invoke functions, which seem to be identical other than begin constexpr since C++11 instead of being constexpr since C++20.

Diff Detail

Event Timeline

philnik created this revision.Apr 3 2022, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2022, 12:53 PM
philnik requested review of this revision.Apr 3 2022, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2022, 12:53 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik updated this revision to Diff 420075.Apr 3 2022, 12:55 PM
  • Make them all _LIBCPP_CONSTEXPR
philnik updated this revision to Diff 420113.Apr 4 2022, 12:36 AM
  • Replace _LIBCPP_CONSTEXPR with constexpr

Looks like a nice cleanup to me, thanks!

libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
274

Can we test this function as constexpr or is there other test coverage?

ldionne accepted this revision.Apr 4 2022, 9:59 AM

This looks correct to me if CI is green, but I would like to see Mark's suggestion addressed.

This revision is now accepted and ready to land.Apr 4 2022, 9:59 AM
philnik updated this revision to Diff 420447.Apr 5 2022, 4:04 AM
philnik marked an inline comment as done.
  • Address comments
philnik updated this revision to Diff 420482.Apr 5 2022, 6:07 AM
  • Try to fix CI
philnik updated this revision to Diff 421008.Apr 6 2022, 2:10 PM
  • Make test constexpr
This revision was automatically updated to reflect the committed changes.