[libcxx-commits] [PATCH] D134420: [libc++] Use intptr_t instead of ptrdiff_t for messages_base::catalog
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 23 11:23:07 PDT 2022
Mordante added inline comments.
================
Comment at: libcxx/include/locale:3464
public:
- typedef ptrdiff_t catalog;
+ typedef intptr_t catalog;
----------------
Did you check these types are the same on all supported platforms.
I noticed `intptr_t` is not guaranteed to be available on all platforms. Is that an issue?
================
Comment at: libcxx/include/locale:3539
nl_catd __cat = (nl_catd)__c;
+ static_assert(sizeof(catalog) >= sizeof(nl_catd), "Unexpected nl_catd type");
char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str());
----------------
Is this code used in C++03? static_assert is a C++11 feature.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134420/new/
https://reviews.llvm.org/D134420
More information about the libcxx-commits
mailing list