This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Adds __utility/to_underlying.h.
ClosedPublic

Authored by Mordante on Apr 24 2021, 8:38 AM.

Details

Reviewers
curdeius
Quuxplusone
Group Reviewers
Restricted Project
Commits
rGa354fd56c504: [libc++] Adds __utility/to_underlying.h.
Summary

During the review of D97115 it was mentioned adding the <utility>
header for __to_underlying was a bit unfortunate. Nowadays we tend to
implement smaller headers, so a good reason to move std::to_underlying
to its own header and adjust <charconv> to use the new header.

Diff Detail

Event Timeline

Mordante created this revision.Apr 24 2021, 8:38 AM
Mordante requested review of this revision.Apr 24 2021, 8:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2021, 8:38 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

Looks good to me. Please wait for at least one more reviewer, if not @ldionne himself, to OK it, though — I don't think it should be just me and yourself looking at this.

libcxx/include/__utility/to_underlying.h
2

This filename (on line 2, that is) doesn't seem quite right; is this libc++ style? I haven't checked.

curdeius accepted this revision.Apr 24 2021, 12:52 PM

LGTM. Please update the filename in the comment as indicated by Arthur before landing.

This revision is now accepted and ready to land.Apr 24 2021, 12:52 PM
Mordante marked an inline comment as done.Apr 25 2021, 4:26 AM

Thanks for the reviews.

libcxx/include/__utility/to_underlying.h
2

It's indeed wrong. I've adjusted it.

This revision was automatically updated to reflect the committed changes.
Mordante marked an inline comment as done.