This is an archive of the discontinued LLVM Phabricator instance.

[libc++][ranges] Add ranges::min_max_result
ClosedPublic

Authored by philnik on Feb 14 2022, 11:26 AM.

Details

Diff Detail

Event Timeline

philnik created this revision.Feb 14 2022, 11:26 AM
philnik requested review of this revision.Feb 14 2022, 11:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2022, 11:26 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Quuxplusone accepted this revision.Feb 21 2022, 1:26 PM

Assuming there's nothing subtly surprising in the test file, LGTM!

libcxx/include/__algorithm/min_max_result.h
27

and likewise adjust the #endif comment. (Also, FYI, going forward it will help to use the form #if !defined(_LIBCPP_HAS_NO_CONCEPTS) consistently, instead of #ifndef, because greppability.)

(This is basically a merge conflict with D118736. Going forward, we should guard everything new in the ranges namespace with _LIBCPP_HAS_NO_INCOMPLETE_RANGES, unless it's a building block for something in the std:: namespace, and until we are ready to kill off _LIBCPP_HAS_NO_INCOMPLETE_RANGES entirely, which will be a while.)

libcxx/include/algorithm
23

Either space-align this comment too, or don't bother aligning comments? (I don't really care about the alignment personally. Seems like it just adds to the git blame spam.)

libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
73–75

s/in1/min/g
s/in2/max/g

This revision is now accepted and ready to land.Feb 21 2022, 1:26 PM
This revision was landed with ongoing or failed builds.Feb 21 2022, 1:52 PM
This revision was automatically updated to reflect the committed changes.
philnik marked 3 inline comments as done.