This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Remove unused include in <compare>.
ClosedPublic

Authored by mumbleskates on Aug 9 2021, 9:21 PM.

Details

Summary

<type_traits> was included in the first iteration of <compare> when it was created as a monolithic header, then never removed. Removing it now is a beneficial no-op since it is not guaranteed by the standard and is already included by all of its subheaders.

Diff Detail

Event Timeline

mumbleskates requested review of this revision.Aug 9 2021, 9:21 PM
mumbleskates created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 9:21 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
cjdb accepted this revision.Aug 9 2021, 9:56 PM
Quuxplusone accepted this revision.Aug 10 2021, 7:20 AM
Quuxplusone added a subscriber: Quuxplusone.

Sure, LGTM. For pre-C++20 headers I believe we still don't want to remove #includes this way, because someone in the wild might be relying on the #include. But for C++20 <compare> (and C++20 <concepts> we're going ahead and doing this, AFAIK.

libcxx/CREDITS.TXT
160–163 ↗(On Diff #365349)

If you're trying to alphabetize the contributor list, this is laughably insufficient. ;) I recommend reverting this diff, but it doesn't really matter AFAIC.

This revision is now accepted and ready to land.Aug 10 2021, 7:20 AM
mumbleskates marked an inline comment as done.Aug 14 2021, 2:22 PM
mumbleskates added inline comments.
libcxx/CREDITS.TXT
160–163 ↗(On Diff #365349)

oh no, hahaha... i'll leave this as-is to grease the rails and fix the other misalphabetization in another diff later.

mumbleskates retitled this revision from Remove unused include in <compare>. to [libc++] Remove unused include in <compare>..Aug 17 2021, 6:31 PM
mumbleskates marked an inline comment as done.

Remove CREDITS.TXT changes (see https://reviews.llvm.org/D108263 )

This revision was automatically updated to reflect the committed changes.