This is an archive of the discontinued LLVM Phabricator instance.

[libc++][NFC] Move concepts to a subheader.
ClosedPublic

Authored by Mordante on Sep 1 2021, 10:47 AM.

Details

Reviewers
Quuxplusone
ldionne
Group Reviewers
Restricted Project
Commits
rG163792113400: [libc++][NFC] Move concepts to a subheader.
Summary

D103357 added some new concepts. Since the header <concepts> has moved
all its concepts to a separate header these new concepts feel out of
place. Move them to the appropriate header.

Diff Detail

Event Timeline

Mordante requested review of this revision.Sep 1 2021, 10:47 AM
Mordante created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 10:47 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante updated this revision to Diff 370005.Sep 1 2021, 11:45 AM

Retrigger CI.

Quuxplusone requested changes to this revision.Sep 1 2021, 11:52 AM
Quuxplusone added a subscriber: Quuxplusone.
Quuxplusone added inline comments.
libcxx/include/__concepts/arithmetic.h
43–44

__libcpp_floating_point is completely unused, as is __libcpp_is_floating_point. I believe you should just remove those.
Anyone who wants to know whether a type is float/double/long-double should just use the standard std::is_floating_point trait or std::floating_point concept. We have no reason to provide a separate version of our own.

libcxx/include/type_traits
791–792

This comment seems no longer useful. Just remove lines 792-794.

This revision now requires changes to proceed.Sep 1 2021, 11:52 AM
Mordante marked 2 inline comments as done.Sep 1 2021, 11:16 PM
Mordante added inline comments.
libcxx/include/__concepts/arithmetic.h
43–44

I added it for consistency, but I don't feel strongly about this concept. I don't like to do that change in this patch. I'll do this in a separate commit.

libcxx/include/type_traits
791–792

Good catch, must have happened when rebasing the original patch.

Mordante updated this revision to Diff 370279.Sep 2 2021, 8:19 AM
Mordante marked 2 inline comments as done.

Remove outdated comment.

ldionne accepted this revision.Sep 2 2021, 9:55 AM
This revision is now accepted and ready to land.Sep 2 2021, 9:55 AM
This revision was automatically updated to reflect the committed changes.