[libcxx-commits] [PATCH] D130946: [libc++][cuchar] Declare std::c8rtomb and std::mbrtoc8 in <cuchar> if available.

Tom Honermann via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 22 13:46:25 PDT 2022


tahonermann added inline comments.


================
Comment at: libcxx/include/__config:1214
 #    define _LIBCPP_PACKED_BYTE_FOR_AIX_END /* empty */
 #  endif
 
----------------
philnik wrote:
> tahonermann wrote:
> > tahonermann wrote:
> > > philnik wrote:
> > > > Does this complete the implementation of P0482R6? If yes, please update the status page and feature test macros. Otherwise, what is still missing?
> > > I expect that this does complete [[ https://wg21.link/p0482r6 | P0482R6 ]], but I'll double check, report back, and update the status page accordingly.
> > > 
> > > With regard to updating feature test macros, I don't think there is anything to be done. P0482R6 only specifies the single `__cpp_lib_char8_t` feature test macro for the library. libc++ already defines that macro based on the prior P0482R6 implementation efforts and the recent [[ https://reviews.llvm.org/D129195 | implementation of P1423 ]] bumped its value. Though P0482R6 is not explicit about this (either in prose or wording), it can be inferred that the feature test macro is not applicable to these declarations as it is not required to be defined by the `<cuchar>` or `uchar.h` headers. Additionally, since `c8rtomb()` and `mbrtoc8()` are expected to be provided by the C library, entangling the macro definition with the availability of those declarations would get messy. This is consistent with the behavior of libstdcxx.
> > I audited the P0482R6 wording and found evidence of declarations for everything except the polymorphic allocator related declarations:
> > - `std::pmr::u8string`
> > - `std::hash<std::pmr::u8string>`
> > 
> > This appears to be expected given that [[ https://wg21.link/p0220r1 | P0220R1 ]] is still listed as in-progress in `libcxx/docs/Status/Cxx17Papers.csv` and that https://reviews.llvm.org/D89057 is still awaiting revisions and approvals.
> > 
> > I think the current state plus this patch suffices to consider P0482R6 complete. I'll update the status page to mark it complete with a note that the missing declarations are pending completion of polymorphic allocator support.
> Then we can't consider it complete yet. It would be great though if you could mark it as `Partial` and add a note that only the `std::pmr::u8string` alias and `std::hash<std::pmr::u8string>` are missing.
That works; will do.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130946/new/

https://reviews.llvm.org/D130946



More information about the libcxx-commits mailing list