This is an archive of the discontinued LLVM Phabricator instance.

[libc] add the CPP algorithm header for min/max
ClosedPublic

Authored by gchatelet on Aug 8 2023, 8:50 AM.

Diff Detail

Event Timeline

gchatelet created this revision.Aug 8 2023, 8:50 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 8 2023, 8:50 AM
gchatelet requested review of this revision.Aug 8 2023, 8:50 AM

These should probably be constexpr and need LIBC_INLINE. If you want to go the extra mile you'd use type traits to confirm that T::operator< exists, but I don't think that's necessary. Make the first use of this the usage in rpc_utils.h

gchatelet updated this revision to Diff 548536.Aug 9 2023, 2:49 AM
  • Rebase and address comments
gchatelet updated this revision to Diff 548537.Aug 9 2023, 2:50 AM
  • Fix typo
gchatelet edited reviewers, added: jhuber6; removed: sivachandra.Aug 9 2023, 2:51 AM
gchatelet added a subscriber: sivachandra.
jhuber6 accepted this revision.Aug 9 2023, 11:02 AM
This revision is now accepted and ready to land.Aug 9 2023, 11:02 AM
sivachandra accepted this revision.Aug 9 2023, 11:07 AM
This revision was landed with ongoing or failed builds.Aug 10 2023, 1:00 AM
This revision was automatically updated to reflect the committed changes.