This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add cpp::byte
ClosedPublic

Authored by gchatelet on Oct 19 2022, 2:41 PM.

Details

Summary

This provides the equivalent of std::byte.
std::byte is a distinct type that implements the concept of byte as specified in the C++ language definition.
https://en.cppreference.com/w/cpp/types/byte

Diff Detail

Event Timeline

gchatelet created this revision.Oct 19 2022, 2:41 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 19 2022, 2:41 PM
gchatelet requested review of this revision.Oct 19 2022, 2:41 PM
sivachandra added inline comments.
libc/src/__support/CPP/byte.h
1 ↗(On Diff #469050)

Should this be in a file named cstddef.h?

12 ↗(On Diff #469050)

Is size_t used in this file?

courbet edited reviewers, added: sivachandra; removed: courbet.Oct 19 2022, 11:50 PM
gchatelet updated this revision to Diff 469895.Oct 22 2022, 7:03 AM
  • fix comments + add bazel support
gchatelet marked 2 inline comments as done.Oct 22 2022, 7:04 AM
sivachandra accepted this revision.Oct 22 2022, 9:56 AM
This revision is now accepted and ready to land.Oct 22 2022, 9:56 AM
This revision was automatically updated to reflect the committed changes.